class StickShift::Scaling

Attributes

generated[RW]
max[RW]
min[RW]

Public Class Methods

new() click to toggle source
# File lib/stickshift-common/models/scaling.rb, line 5
def initialize
  self.min = 1
  self.max = -1
end

Public Instance Methods

from_descriptor(spec_hash = {}) click to toggle source
# File lib/stickshift-common/models/scaling.rb, line 14
def from_descriptor(spec_hash = {})
  self.min = spec_hash["Min"].to_i || 1
  self.max = spec_hash["Max"].to_i || -1
  self
end
to_descriptor() click to toggle source
# File lib/stickshift-common/models/scaling.rb, line 20
def to_descriptor
  {
    "Min" => self.min,
    "Max" => self.max
  }
end