Class: Zodra::Variant
- Inherits:
-
Object
- Object
- Zodra::Variant
- Defined in:
- lib/zodra/variant.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
Instance Method Summary collapse
-
#initialize(tag:, attributes: {}) ⇒ Variant
constructor
A new instance of Variant.
Constructor Details
#initialize(tag:, attributes: {}) ⇒ Variant
Returns a new instance of Variant.
7 8 9 10 |
# File 'lib/zodra/variant.rb', line 7 def initialize(tag:, attributes: {}) @tag = tag.to_sym @attributes = attributes end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
5 6 7 |
# File 'lib/zodra/variant.rb', line 5 def attributes @attributes end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
5 6 7 |
# File 'lib/zodra/variant.rb', line 5 def tag @tag end |