Class: Flickry::Size

Inherits:
Base show all
Defined in:
lib/flickry/size.rb

Instance Method Summary collapse

Methods inherited from Base

#attributes

Methods inherited from SuperStruct

#[], #[]=, #each, #each_pair, #members

Constructor Details

#initialize(sz) ⇒ Size

Returns a new instance of Size.



3
4
5
6
# File 'lib/flickry/size.rb', line 3

def initialize(sz)
  super(nil)
  extract_attrs!(sz, [:height, :width, :media, :source, :url])
end

Instance Method Details

#to_sourceObject



12
13
14
# File 'lib/flickry/size.rb', line 12

def to_source
  clean(self.source)
end

#to_urlObject



8
9
10
# File 'lib/flickry/size.rb', line 8

def to_url
  clean(self.url)
end