class OpenWeather::Models::Model

Attributes

options[R]

Public Class Methods

new(args = nil, options = {}) click to toggle source
Calls superclass method
# File lib/open_weather/models/model.rb, line 12
def initialize(args = nil, options = {})
  super args
  @options = { units: OpenWeather.config.units }.merge(options || {})
end

Public Instance Methods

units() click to toggle source
# File lib/open_weather/models/model.rb, line 17
def units
  options && options[:units]&.to_sym
end