Class: GatherContent::Api::Statuses
- Includes:
- Enumerable
- Defined in:
- lib/gather_content/api/statuses.rb
Instance Attribute Summary collapse
-
#project_id ⇒ Object
Returns the value of attribute project_id.
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize(project_id) ⇒ Statuses
constructor
A new instance of Statuses.
Methods inherited from Base
#fetch, #get, #post, #post_json, #reset
Constructor Details
#initialize(project_id) ⇒ Statuses
Returns a new instance of Statuses.
8 9 10 11 |
# File 'lib/gather_content/api/statuses.rb', line 8 def initialize(project_id) raise ArgumentError, "project_id is required!" if project_id.nil? @project_id = project_id end |
Instance Attribute Details
#project_id ⇒ Object
Returns the value of attribute project_id.
5 6 7 |
# File 'lib/gather_content/api/statuses.rb', line 5 def project_id @project_id end |
Instance Method Details
#each(&block) ⇒ Object
13 14 15 16 17 |
# File 'lib/gather_content/api/statuses.rb', line 13 def each(&block) fetch.each do |status| yield GatherContent::Api::Status.new(@project_id, status['id'], status) end end |