Class: Srgs::OneOf
- Inherits:
-
Object
- Object
- Srgs::OneOf
- Defined in:
- lib/srgs/elements/one_of.rb
Instance Attribute Summary collapse
-
#items ⇒ Object
Returns the value of attribute items.
Instance Method Summary collapse
- #<<(item) ⇒ Object
-
#initialize ⇒ OneOf
constructor
A new instance of OneOf.
Constructor Details
#initialize ⇒ OneOf
Returns a new instance of OneOf.
6 7 8 |
# File 'lib/srgs/elements/one_of.rb', line 6 def initialize @items = Array.new end |
Instance Attribute Details
#items ⇒ Object
Returns the value of attribute items.
4 5 6 |
# File 'lib/srgs/elements/one_of.rb', line 4 def items @items end |
Instance Method Details
#<<(item) ⇒ Object
10 11 12 13 |
# File 'lib/srgs/elements/one_of.rb', line 10 def <<(item) @items << item self end |