Class: PhotoArray

Inherits:
Virtus::Attribute
  • Object
show all
Defined in:
lib/telegrammer/data_types/photo_array.rb

Instance Method Summary collapse

Instance Method Details

#coerce(value) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/telegrammer/data_types/photo_array.rb', line 4

def coerce(value)
  if value.is_a?(Hash)
    super(Telegrammer::DataTypes::PhotoSize.new(value))
  else
    super
  end
end