Class: Flickry::Size
- Inherits:
-
Base
- Object
- OpenStruct
- SuperStruct
- Base
- Flickry::Size
- Defined in:
- lib/flickry/size.rb
Instance Method Summary collapse
-
#initialize(sz) ⇒ Size
constructor
A new instance of Size.
- #to_source ⇒ Object
- #to_url ⇒ Object
Methods inherited from Base
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_source ⇒ Object
12 13 14 |
# File 'lib/flickry/size.rb', line 12 def to_source clean(self.source) end |
#to_url ⇒ Object
8 9 10 |
# File 'lib/flickry/size.rb', line 8 def to_url clean(self.url) end |