Exception: Foobara::TypeDeclarations::Dsl::BadAttributeError
- Inherits:
-
StandardError
- Object
- StandardError
- Foobara::TypeDeclarations::Dsl::BadAttributeError
- Defined in:
- foobara-0.0.110/projects/type_declarations/src/dsl/attributes.rb
Instance Attribute Summary collapse
-
#attribute_name ⇒ Object
Returns the value of attribute attribute_name.
-
#method_name ⇒ Object
Returns the value of attribute method_name.
Instance Method Summary collapse
-
#initialize(attribute_name, method_name) ⇒ BadAttributeError
constructor
A new instance of BadAttributeError.
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_name ⇒ Object
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_name ⇒ Object
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 |