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.



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

#arrayObject

Returns the value of attribute array.



31
32
33
# File 'lib/telegramObjects.rb', line 31

def array
  @array
end

#typeObject

Returns the value of attribute type.



31
32
33
# File 'lib/telegramObjects.rb', line 31

def type
  @type
end

Instance Method Details

#to_aObject



41
42
43
# File 'lib/telegramObjects.rb', line 41

def to_a
  @array
end