module Bixby::Hashify
Adds to_hash
method to an Object
Public Instance Methods
to_hash()
click to toggle source
Creates a Hash representation of self
@return [Hash]
# File lib/bixby-common/util/hashify.rb, line 10 def to_hash self.instance_variables.inject({}) { |m,v| m[v[1,v.length].to_sym] = instance_variable_get(v); m } end