class Beaver::FlatGuide
The configuration for a flat tip guide. All three guides must be provided.
Attributes
amount_high[RW]
The 'high' guide. @return [Integer]
amount_low[RW]
The 'low' guide. @return [Integer]
amount_medium[RW]
The 'medium' guide. @return [Integer]
Public Class Methods
from_hash(hash)
click to toggle source
Creates an instance of the object from a hash.
# File lib/beaver/models/flat_guide.rb, line 39 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. amount_low = hash['amount_low'] amount_medium = hash['amount_medium'] amount_high = hash['amount_high'] # Create object from extracted values. FlatGuide.new(amount_low, amount_medium, amount_high) end
names()
click to toggle source
A mapping from model property names to API property names.
# File lib/beaver/models/flat_guide.rb, line 22 def self.names @_hash = {} if @_hash.nil? @_hash['amount_low'] = 'amount_low' @_hash['amount_medium'] = 'amount_medium' @_hash['amount_high'] = 'amount_high' @_hash end
new(amount_low = nil, amount_medium = nil, amount_high = nil)
click to toggle source
# File lib/beaver/models/flat_guide.rb, line 30 def initialize(amount_low = nil, amount_medium = nil, amount_high = nil) @amount_low = amount_low @amount_medium = amount_medium @amount_high = amount_high end