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.
32 33 34 35 36 37 38 39 |
# File 'lib/telegramObjects.rb', line 32 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.
31 32 33 |
# File 'lib/telegramObjects.rb', line 31 def array @array end |
#type ⇒ Object
Returns the value of attribute type.
31 32 33 |
# File 'lib/telegramObjects.rb', line 31 def type @type end |
Instance Method Details
#to_a ⇒ Object
41 42 43 |
# File 'lib/telegramObjects.rb', line 41 def to_a @array end |