Class: ExploreMars::Photo

Inherits:
Object
  • Object
show all
Defined in:
lib/explore_mars/photo.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#cameraObject (readonly)

Returns the value of attribute camera.



4
5
6
# File 'lib/explore_mars/photo.rb', line 4

def camera
  @camera
end

#earth_dateObject (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

#roverObject (readonly)

Returns the value of attribute rover.



4
5
6
# File 'lib/explore_mars/photo.rb', line 4

def rover
  @rover
end

#solObject (readonly)

Returns the value of attribute sol.



4
5
6
# File 'lib/explore_mars/photo.rb', line 4

def sol
  @sol
end

#srcObject (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_sObject



14
15
16
# File 'lib/explore_mars/photo.rb', line 14

def to_s
  @src
end