Class: Hash
- Inherits:
-
Object
show all
- Defined in:
- lib/gumdrop/util/core_ex.rb
Instance Method Summary
collapse
Instance Method Details
#ends_with?(string) ⇒ Boolean
15
16
17
|
# File 'lib/gumdrop/util/core_ex.rb', line 15
def ends_with?(string)
self[0..(string.length)] == string
end
|
#starts_with?(string) ⇒ Boolean
19
20
21
|
# File 'lib/gumdrop/util/core_ex.rb', line 19
def starts_with?(string)
self[0..(string.length)] == string
end
|
#to_symbolized_hash ⇒ Object
5
6
7
8
9
|
# File 'lib/gumdrop/util/core_ex.rb', line 5
def to_symbolized_hash
new_hash= {}
self.each {|k,v| new_hash[k.to_sym]= v }
new_hash
end
|