class Journea::Data

Attributes

keyvalues[R]

Public Class Methods

new(keyvalue_collection) click to toggle source
# File lib/journea/data.rb, line 6
def initialize(keyvalue_collection)
  @keyvalues = keyvalue_collection
end

Public Instance Methods

method_missing(method_sym, *arguments, &block) click to toggle source

TODO: Currently having to eat this rubocop error until such time as we understand what form the respond_to_missing? should take rubocop:disable Style/MethodMissing

Calls superclass method
# File lib/journea/data.rb, line 13
def method_missing(method_sym, *arguments, &block)
  val = keyvalues.find_by(key: method_sym).value
  return val if val.present?
  super
end