class Grape::Util::Lazy::ValueHash

Public Class Methods

new(hash) click to toggle source
Calls superclass method Grape::Util::Lazy::Value::new
# File lib/grape/util/lazy/value_hash.rb, line 7
def initialize(hash)
  super
  @value_hash = ActiveSupport::HashWithIndifferentAccess.new
  hash.each do |key, value|
    self[key] = value
  end
end

Public Instance Methods

evaluate() click to toggle source
# File lib/grape/util/lazy/value_hash.rb, line 15
def evaluate
  @value_hash.transform_values(&:evaluate)
end