Module: Unfickle

Defined in:
lib/unfickle/version.rb,
lib/unfickle/unfickle.rb

Constant Summary collapse

VERSION =
'0.0.1'

Instance Method Summary collapse

Instance Method Details

#[](key) ⇒ Object



23
24
25
# File 'lib/unfickle/unfickle.rb', line 23

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

#add_item(key, value) ⇒ Object



2
3
4
5
# File 'lib/unfickle/unfickle.rb', line 2

def add_item(key,value)
  @hash ||= {}
  @hash[key]=value
end

#clearObject



27
28
29
# File 'lib/unfickle/unfickle.rb', line 27

def clear
  @hash = {}
end

#const_missing(key) ⇒ Object



7
8
9
# File 'lib/unfickle/unfickle.rb', line 7

def const_missing(key)
  @hash[key]
end

#eachObject



11
12
13
# File 'lib/unfickle/unfickle.rb', line 11

def each
  @hash.each {|key,value| yield(key,value)}
end

#keysObject



19
20
21
# File 'lib/unfickle/unfickle.rb', line 19

def keys
  @hash.keys || []
end

#valuesObject



15
16
17
# File 'lib/unfickle/unfickle.rb', line 15

def values
  @hash.values || []
end