Module: Psychic::Util::Hashable

Included in:
Shell::ExecutionResult
Defined in:
lib/psychic/util.rb

Instance Method Summary collapse

Instance Method Details

#to_hashObject



6
7
8
9
10
# File 'lib/psychic/util.rb', line 6

def to_hash
  instance_variables.each_with_object({}) do |var, hash|
    hash[var.to_s.delete('@')] = instance_variable_get(var)
  end
end