Class: Srgs::OneOf

Inherits:
Object
  • Object
show all
Defined in:
lib/srgs/elements/one_of.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeOneOf

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

#itemsObject

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