Exception: Fortnox::UnknownAttributeError
- Inherits:
-
AttributeError
- Object
- StandardError
- Error
- AttributeError
- Fortnox::UnknownAttributeError
- Defined in:
- lib/fortnox.rb
Instance Attribute Summary collapse
-
#attribute_names ⇒ Object
readonly
Returns the value of attribute attribute_names.
-
#subject ⇒ Object
readonly
Returns the value of attribute subject.
Instance Method Summary collapse
- #attribute_name ⇒ Object
-
#initialize(attribute_names, subject = nil) ⇒ UnknownAttributeError
constructor
A new instance of UnknownAttributeError.
Constructor Details
#initialize(attribute_names, subject = nil) ⇒ UnknownAttributeError
Returns a new instance of UnknownAttributeError.
98 99 100 101 102 103 |
# File 'lib/fortnox.rb', line 98 def initialize(attribute_names, subject = nil) @attribute_names = Array(attribute_names) @subject = subject super("Unknown attribute#{'s' if @attribute_names.length > 1} for #{subject}: " \ "#{@attribute_names.map(&:inspect).join(', ')}") end |
Instance Attribute Details
#attribute_names ⇒ Object (readonly)
Returns the value of attribute attribute_names.
96 97 98 |
# File 'lib/fortnox.rb', line 96 def attribute_names @attribute_names end |
#subject ⇒ Object (readonly)
Returns the value of attribute subject.
96 97 98 |
# File 'lib/fortnox.rb', line 96 def subject @subject end |
Instance Method Details
#attribute_name ⇒ Object
105 106 107 |
# File 'lib/fortnox.rb', line 105 def attribute_name @attribute_names.first end |