Class: Yweather::Image
- Inherits:
-
Object
- Object
- Yweather::Image
- Defined in:
- lib/yweather/image.rb
Instance Attribute Summary collapse
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#link ⇒ Object
readonly
Returns the value of attribute link.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(data) ⇒ Image
constructor
A new instance of Image.
Constructor Details
#initialize(data) ⇒ Image
Returns a new instance of Image.
10 11 12 13 14 15 16 |
# File 'lib/yweather/image.rb', line 10 def initialize (data) @title = data[:title] @link = data[:link] @url = data[:url] @height = data[:height] @width = data[:width] end |
Instance Attribute Details
#height ⇒ Object (readonly)
Returns the value of attribute height.
4 5 6 |
# File 'lib/yweather/image.rb', line 4 def height @height end |
#link ⇒ Object (readonly)
Returns the value of attribute link.
5 6 7 |
# File 'lib/yweather/image.rb', line 5 def link @link end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
6 7 8 |
# File 'lib/yweather/image.rb', line 6 def title @title end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
7 8 9 |
# File 'lib/yweather/image.rb', line 7 def url @url end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
8 9 10 |
# File 'lib/yweather/image.rb', line 8 def width @width end |