Method: Manywho::MyStruct#to_json
- Defined in:
- lib/manywho.rb
#to_json(options = {}) ⇒ Object
315 316 317 318 319 320 321 |
# File 'lib/manywho.rb', line 315 def to_json(= {}) hash = {} self.instance_variables.each do |var| hash[var[1...var.length]] = self.instance_variable_get var end return hash.to_json end |