Class: LiveJournal::Request::HashStrip

Inherits:
Object
  • Object
show all
Defined in:
lib/livejournal/request.rb

Overview

wrapper around a given hash, prefixing all key lookups with base

Instance Method Summary collapse

Constructor Details

#initialize(base, hash) ⇒ HashStrip

:nodoc:



49
50
51
52
# File 'lib/livejournal/request.rb', line 49

def initialize(base, hash)
  @base = base
  @hash = hash
end

Instance Method Details

#[](key) ⇒ Object



53
54
55
# File 'lib/livejournal/request.rb', line 53

def [](key)
  @hash[@base + key]
end