Method: AssetHost::Asset#initialize
- Defined in:
- lib/asset_host/asset.rb
#initialize(json) ⇒ Asset
Returns a new instance of Asset.
124 125 126 127 128 129 130 131 |
# File 'lib/asset_host/asset.rb', line 124 def initialize(json) @json = json @_sizes = {} ATTRIBUTES.map(&:to_s).each do |attribute| send "#{attribute}=", @json[attribute] end end |