Module: Tvdbjson::Hashable

Included in:
Episode, Image, Series
Defined in:
lib/tvdbjson/hashable.rb

Instance Method Summary collapse

Instance Method Details

#to_hashObject



4
5
6
7
8
# File 'lib/tvdbjson/hashable.rb', line 4

def to_hash
  hash = {}
  instance_variables.each {|var| hash[var.to_s.delete("@")] = instance_variable_get(var) }
  hash
end