class Beaver::PersonalCountryInfo
PersonalCountryInfo
Model.
Attributes
ca[RW]
TODO: Write general description for this method @return [CA]
gb[RW]
TODO: Write general description for this method @return [Object]
us[RW]
TODO: Write general description for this method @return [US]
Public Class Methods
from_hash(hash)
click to toggle source
Creates an instance of the object from a hash.
# File lib/beaver/models/personal_country_info.rb, line 39 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. ca = CA.from_hash(hash['CA']) if hash['CA'] gb = hash['GB'] us = US.from_hash(hash['US']) if hash['US'] # Create object from extracted values. PersonalCountryInfo.new(ca, gb, us) end
names()
click to toggle source
A mapping from model property names to API property names.
# File lib/beaver/models/personal_country_info.rb, line 22 def self.names @_hash = {} if @_hash.nil? @_hash['ca'] = 'CA' @_hash['gb'] = 'GB' @_hash['us'] = 'US' @_hash end
new(ca = nil, gb = nil, us = nil)
click to toggle source
# File lib/beaver/models/personal_country_info.rb, line 30 def initialize(ca = nil, gb = nil, us = nil) @ca = ca @gb = gb @us = us end