class Hobby::JSON::Keys::KeyParser
Public Class Methods
new(&block)
click to toggle source
# File lib/hobby/json/keys.rb, line 5 def initialize &block @block = -> json, key { key = key.to_s if key.is_a? Symbol block.call json, key } end
Public Instance Methods
[](key)
click to toggle source
# File lib/hobby/json/keys.rb, line 12 def [] key -> json { @block.call json, key } end