class Youtube::WeatherForcaseJsonImported

WeatherForcaseJsonImported Model.

Attributes

date[RW]

TODO: Write general description for this method @return [String]

summary[RW]

TODO: Write general description for this method @return [String]

temperature_c[RW]

TODO: Write general description for this method @return [Integer]

temperature_f[RW]

TODO: Write general description for this method @return [Integer]

Public Class Methods

from_hash(hash) click to toggle source

Creates an instance of the object from a hash.

# File lib/youtube/models/weather_forcase_json_imported.rb, line 46
def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  date = hash['date']
  temperature_c = hash['temperatureC']
  temperature_f = hash['temperatureF']
  summary = hash['summary']

  # Create object from extracted values.
  WeatherForcaseJsonImported.new(date,
                                 temperature_c,
                                 temperature_f,
                                 summary)
end
names() click to toggle source

A mapping from model property names to API property names.

# File lib/youtube/models/weather_forcase_json_imported.rb, line 26
def self.names
  @_hash = {} if @_hash.nil?
  @_hash['date'] = 'date'
  @_hash['temperature_c'] = 'temperatureC'
  @_hash['temperature_f'] = 'temperatureF'
  @_hash['summary'] = 'summary'
  @_hash
end
new(date = nil, temperature_c = nil, temperature_f = nil, summary = nil) click to toggle source
# File lib/youtube/models/weather_forcase_json_imported.rb, line 35
def initialize(date = nil,
               temperature_c = nil,
               temperature_f = nil,
               summary = nil)
  @date = date
  @temperature_c = temperature_c
  @temperature_f = temperature_f
  @summary = summary
end