Exception: Foobara::TypeDeclarations::Dsl::BadAttributeError

Inherits:
StandardError
  • Object
show all
Defined in:
foobara-0.0.110/projects/type_declarations/src/dsl/attributes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attribute_name, method_name) ⇒ BadAttributeError

Returns a new instance of BadAttributeError.



9
10
11
12
13
14
15
16
# File 'foobara-0.0.110/projects/type_declarations/src/dsl/attributes.rb', line 9

def initialize(attribute_name, method_name)
  self.attribute_name = attribute_name
  self.method_name = method_name

  super("You probably did not mean to declare an attribute named \"#{attribute_name}\" " \
        "but you tried to access .\"#{method_name}\" method on it. " \
        "Return values of attribute declarations do not return anything meaningful.")
end

Instance Attribute Details

#attribute_nameObject

Returns the value of attribute attribute_name.



7
8
9
# File 'foobara-0.0.110/projects/type_declarations/src/dsl/attributes.rb', line 7

def attribute_name
  @attribute_name
end

#method_nameObject

Returns the value of attribute method_name.



7
8
9
# File 'foobara-0.0.110/projects/type_declarations/src/dsl/attributes.rb', line 7

def method_name
  @method_name
end