class IknowParams::Parser::HashParser

Simple wrapper to use IknowParams::Parser to extract and verify content from an arbitrary hash

Attributes

params[R]

Public Class Methods

new(view_hash) click to toggle source
# File lib/iknow_params/parser/hash_parser.rb, line 12
def initialize(view_hash)
  @params = ActiveSupport::HashWithIndifferentAccess.new(view_hash)
end

Public Instance Methods

parse(&block) click to toggle source
# File lib/iknow_params/parser/hash_parser.rb, line 16
def parse(&block)
  instance_exec(&block)
end