Sha256: 043a3abc68a052cff11d40742f19bb375011f8903333fb8df8ff660b8f93fd18
Contents?: true
Size: 282 Bytes
Versions: 34
Compression:
Stored size: 282 Bytes
Contents
module Bixby # Adds to_hash method to an Object module Hashify # Creates a Hash representation of self # # @return [Hash] def to_hash self.instance_variables.inject({}) { |m,v| m[v[1,v.length].to_sym] = instance_variable_get(v); m } end end # Hashify end # Bixby
Version data entries
34 entries across 34 versions & 2 rubygems