Class: ArrayOf

Inherits:
Object
  • Object
show all
Defined in:
lib/telegramObjects.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#arrayObject

Returns the value of attribute array.



33
34
35
# File 'lib/telegramObjects.rb', line 33

def array
  @array
end

#typeObject

Returns the value of attribute type.



33
34
35
# File 'lib/telegramObjects.rb', line 33

def type
  @type
end

Instance Method Details

#to_aObject



43
44
45
# File 'lib/telegramObjects.rb', line 43

def to_a
  @array
end