Module: Str2Hash::String
- Defined in:
- lib/str2hash.rb
Instance Method Summary collapse
-
#to_h ⇒ Hash
Converts the string to a hash representation.
Instance Method Details
#to_h ⇒ Hash
Converts the string to a hash representation
152 153 154 155 156 157 158 159 160 161 |
# File 'lib/str2hash.rb', line 152 def to_h p = HashParse.new t = HashTransform.new h_str = self.clone h_str.strip! t.apply(p.parse(self.strip)) end |