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