Class: PGit::Pivotal::Story

Inherits:
IndividualRequest show all
Defined in:
lib/pgit/pivotal/story.rb

Constant Summary collapse

ATTRIBUTES =
:estimate, :id, :project_id, :follower_ids, :group, :name, :description,
:story_type, :current_state, :accepted_at, :deadline, :requested_by_id,
:owner_ids, :labels, :label_ids, :before_id, :after_id, :integration_id,
:external_id

Instance Method Summary collapse

Methods inherited from IndividualRequest

#define_methods, #get!, #hash=, #put!, #to_hash

Methods inherited from Request

#api_token, #api_version, #before_initialize, #configuration, #current_project, #get_request, #link

Constructor Details

#initialize(id = :no_story_id_given) {|_self| ... } ⇒ Story

Returns a new instance of Story.

Yields:

  • (_self)

Yield Parameters:



21
22
23
24
25
26
27
# File 'lib/pgit/pivotal/story.rb', line 21

def initialize(id=:no_story_id_given, &block)
  before_initialize
  @changed_attributes = []
  @id = id
  @follower_ids = []
  yield self if block_given?
end

Instance Method Details

#attributesObject



33
34
35
# File 'lib/pgit/pivotal/story.rb', line 33

def attributes
  ATTRIBUTES
end


29
30
31
# File 'lib/pgit/pivotal/story.rb', line 29

def sublink
  "projects/#{@project_id}/stories/#{id}"
end