Class: Struct
- Inherits:
-
Object
- Object
- Struct
- Defined in:
- lib/cricos_scrape/json_struct.rb
Direct Known Subclasses
CricosScrape::Address, CricosScrape::Contact, CricosScrape::ContactOfficer, CricosScrape::Course, CricosScrape::Institution, CricosScrape::Location
Instance Method Summary collapse
Instance Method Details
#to_json(*a) ⇒ Object
8 9 10 |
# File 'lib/cricos_scrape/json_struct.rb', line 8 def to_json(*a) to_map.to_json(*a) end |
#to_map ⇒ Object
2 3 4 5 6 |
# File 'lib/cricos_scrape/json_struct.rb', line 2 def to_map map = Hash.new self.members.each { |m| map[m] = self[m] } map end |