class MotoRecall::Recall

Constants

KEYS

Public Class Methods

new(hash) click to toggle source
# File lib/moto_recall/recall.rb, line 18
def initialize(hash)
  KEYS.each do |key|
    instance_variable_set("@#{key}", hash[key])
  end
end

Public Instance Methods

keys() click to toggle source
# File lib/moto_recall/recall.rb, line 32
def keys
  KEYS
end
to_h() click to toggle source
# File lib/moto_recall/recall.rb, line 28
def to_h
  KEYS.reduce({}) { |h, k| h[k] = send(k); h }
end
to_json() click to toggle source
# File lib/moto_recall/recall.rb, line 24
def to_json
  to_h.to_json
end
values() click to toggle source
# File lib/moto_recall/recall.rb, line 36
def values
  KEYS.map { |k| send(k) }
end