Class: ExploreMars::Photo
- Inherits:
-
Object
- Object
- ExploreMars::Photo
- Defined in:
- lib/explore_mars/photo.rb
Instance Attribute Summary collapse
-
#camera ⇒ Object
readonly
Returns the value of attribute camera.
-
#earth_date ⇒ Object
readonly
Returns the value of attribute earth_date.
-
#rover ⇒ Object
readonly
Returns the value of attribute rover.
-
#sol ⇒ Object
readonly
Returns the value of attribute sol.
-
#src ⇒ Object
readonly
Returns the value of attribute src.
Instance Method Summary collapse
-
#initialize(src, sol, camera, earth_date, rover) ⇒ Photo
constructor
A new instance of Photo.
- #to_s ⇒ Object
Constructor Details
#initialize(src, sol, camera, earth_date, rover) ⇒ Photo
Returns a new instance of Photo.
6 7 8 9 10 11 12 |
# File 'lib/explore_mars/photo.rb', line 6 def initialize(src, sol, camera, earth_date, rover) @src = src @sol = sol @camera = camera @earth_date = Date.strptime(earth_date) @rover = rover end |
Instance Attribute Details
#camera ⇒ Object (readonly)
Returns the value of attribute camera.
4 5 6 |
# File 'lib/explore_mars/photo.rb', line 4 def camera @camera end |
#earth_date ⇒ Object (readonly)
Returns the value of attribute earth_date.
4 5 6 |
# File 'lib/explore_mars/photo.rb', line 4 def earth_date @earth_date end |
#rover ⇒ Object (readonly)
Returns the value of attribute rover.
4 5 6 |
# File 'lib/explore_mars/photo.rb', line 4 def rover @rover end |
#sol ⇒ Object (readonly)
Returns the value of attribute sol.
4 5 6 |
# File 'lib/explore_mars/photo.rb', line 4 def sol @sol end |
#src ⇒ Object (readonly)
Returns the value of attribute src.
4 5 6 |
# File 'lib/explore_mars/photo.rb', line 4 def src @src end |
Instance Method Details
#to_s ⇒ Object
14 15 16 |
# File 'lib/explore_mars/photo.rb', line 14 def to_s @src end |