Class: NoaaWeatherClient::CLI::Coordinate

Inherits:
Struct
  • Object
show all
Defined in:
lib/noaa_weather_client/cli.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#latitudeObject

Returns the value of attribute latitude

Returns:

  • (Object)

    the current value of latitude



44
45
46
# File 'lib/noaa_weather_client/cli.rb', line 44

def latitude
  @latitude
end

#longitudeObject

Returns the value of attribute longitude

Returns:

  • (Object)

    the current value of longitude



44
45
46
# File 'lib/noaa_weather_client/cli.rb', line 44

def longitude
  @longitude
end

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


45
46
47
# File 'lib/noaa_weather_client/cli.rb', line 45

def valid?
  latitude && longitude rescue false
end