Class: Struct

Inherits:
Object
  • Object
show all
Defined in:
lib/rubyrogues.rb

Direct Known Subclasses

Podcast

Instance Method Summary collapse

Instance Method Details

#to_json(*a) ⇒ Object



18
19
20
# File 'lib/rubyrogues.rb', line 18

def to_json(*a)
  to_map.to_json(*a)
end

#to_mapObject



12
13
14
15
16
# File 'lib/rubyrogues.rb', line 12

def to_map
  map = Hash.new
  self.members.each { |m| map[m] = self[m] }
  map
end