Class: LeverPostings::Posting
- Inherits:
-
Object
- Object
- LeverPostings::Posting
- Defined in:
- lib/lever_postings/posting.rb
Class Method Summary collapse
Class Method Details
.from_json(json) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/lever_postings/posting.rb', line 3 def self.from_json(json) if json[0] postings = [] json.each do |posting| postings << ::Hashie::Mash.new(posting) end postings elsif json != [] ::Hashie::Mash.new(json) else json end end |