Method: Contentstack::EntryCollection#initialize
- Defined in:
- lib/contentstack/entry_collection.rb
#initialize(json, content_type_uid = nil) ⇒ EntryCollection
7 8 9 10 11 12 13 |
# File 'lib/contentstack/entry_collection.rb', line 7 def initialize(json, content_type_uid=nil) @count = json["count"] if json["count"] @entries = json["entries"].collect{|entry| Entry.new(entry, content_type_uid) } @schema = json["schema"].symbolize_keys if json["schema"] @content_type = json["content_type"].symbolize_keys if json["content_type"] self end |