Sha256: d0af04504e1a758c092faa40f450a7bd14524096973cc4966b1e72902064c9f6
Contents?: true
Size: 472 Bytes
Versions: 2
Compression:
Stored size: 472 Bytes
Contents
module A2z module Responses class Image attr_accessor :url, :width, :height def width=(value) @width = value.to_i end def height=(value) @height = value.to_i end def self.from_response(data) new.tap do |image| image.url = data['URL'] image.width = data['Width'] image.height = data['Height'] image.freeze end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
a2z-0.0.4 | lib/a2z/responses/image.rb |
a2z-0.0.3 | lib/a2z/responses/image.rb |