Class: Nucleo::Models::Pages
- Inherits:
-
Object
- Object
- Nucleo::Models::Pages
- Includes:
- Enumerable
- Defined in:
- lib/nucleo/models/pages.rb
Class Method Summary collapse
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize(collection) ⇒ Pages
constructor
A new instance of Pages.
Constructor Details
#initialize(collection) ⇒ Pages
Returns a new instance of Pages.
6 7 8 |
# File 'lib/nucleo/models/pages.rb', line 6 def initialize(collection) @collection = Array(collection) end |
Class Method Details
.all(site_id) ⇒ Object
10 11 12 13 14 |
# File 'lib/nucleo/models/pages.rb', line 10 def self.all(site_id) response_body = Nucleo::Requests::Page.all(site_id) Nucleo::Models::Feed.for_record(response_body) end |
Instance Method Details
#each(&block) ⇒ Object
28 29 30 |
# File 'lib/nucleo/models/pages.rb', line 28 def each(&block) internal_collection.each(&block) end |