Class: Superstructure::AttributeParser
- Inherits:
-
Object
- Object
- Superstructure::AttributeParser
- Defined in:
- lib/superstructure/attribute_parser.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
- #error ⇒ Object
- #error? ⇒ Boolean
-
#initialize(arguments, opts) ⇒ AttributeParser
constructor
A new instance of AttributeParser.
Constructor Details
#initialize(arguments, opts) ⇒ AttributeParser
Returns a new instance of AttributeParser.
5 6 7 8 9 10 11 12 |
# File 'lib/superstructure/attribute_parser.rb', line 5 def initialize(arguments, opts) @attributes = {} @possible_error = ArgumentErrorBuilder.new @arguments = arguments @opts = opts parse! end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
3 4 5 |
# File 'lib/superstructure/attribute_parser.rb', line 3 def attributes @attributes end |
Instance Method Details
#error ⇒ Object
18 19 20 |
# File 'lib/superstructure/attribute_parser.rb', line 18 def error @possible_error.build end |
#error? ⇒ Boolean
14 15 16 |
# File 'lib/superstructure/attribute_parser.rb', line 14 def error? @possible_error.error? end |