class Nasty::Key
Public Class Methods
new(key)
click to toggle source
# File lib/nasty/key.rb, line 3 def initialize(key) @key = key end
Public Instance Methods
add_to(store, value)
click to toggle source
# File lib/nasty/key.rb, line 7 def add_to(store, value) store[to_sym] = value end
contained_in?(store)
click to toggle source
# File lib/nasty/key.rb, line 15 def contained_in?(store) item_from(store) end
item_from(store)
click to toggle source
# File lib/nasty/key.rb, line 19 def item_from(store) store[to_sym] end
remove_from(store)
click to toggle source
# File lib/nasty/key.rb, line 11 def remove_from(store) store[to_sym] = nil end
to_sym()
click to toggle source
# File lib/nasty/key.rb, line 23 def to_sym @key.to_sym end