class Nasty::SimpleContext
Public Class Methods
new(store = {})
click to toggle source
# File lib/nasty/simple_context.rb, line 3 def initialize(store = {}) @store = store end
Public Instance Methods
add(key, value)
click to toggle source
# File lib/nasty/simple_context.rb, line 7 def add(key, value) key.add_to(@store, value) end
contains?(key)
click to toggle source
# File lib/nasty/simple_context.rb, line 15 def contains?(key) key.contained_in?(@store) end
item_for(key)
click to toggle source
# File lib/nasty/simple_context.rb, line 19 def item_for(key) key.item_from(@store) end
remove(key)
click to toggle source
# File lib/nasty/simple_context.rb, line 11 def remove(key) key.remove_from(@store) end