Class: ArrayOf
- Inherits:
-
Object
- Object
- ArrayOf
- Defined in:
- lib/telegramObjects.rb
Instance Attribute Summary collapse
-
#array ⇒ Object
Returns the value of attribute array.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(ar, cl) ⇒ ArrayOf
constructor
A new instance of ArrayOf.
- #to_a ⇒ Object
Constructor Details
#initialize(ar, cl) ⇒ ArrayOf
Returns a new instance of ArrayOf.
34 35 36 37 38 39 40 41 |
# File 'lib/telegramObjects.rb', line 34 def initialize ar, cl return if !ar @array = [] @type = cl ar.each do |e| @array<<cl.new(e) end end |
Instance Attribute Details
#array ⇒ Object
Returns the value of attribute array.
33 34 35 |
# File 'lib/telegramObjects.rb', line 33 def array @array end |
#type ⇒ Object
Returns the value of attribute type.
33 34 35 |
# File 'lib/telegramObjects.rb', line 33 def type @type end |
Instance Method Details
#to_a ⇒ Object
43 44 45 |
# File 'lib/telegramObjects.rb', line 43 def to_a @array end |