Class: Trajectory::Iteration

Inherits:
Object
  • Object
show all
Includes:
Virtus
Defined in:
lib/trajectory/domain/iteration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#projectProject

Fetch the project the iteration belongs to

Returns:



74
75
76
# File 'lib/trajectory/domain/iteration.rb', line 74

def project
  @project ||= DataStore.find_project_by_id(project_id)
end

Instance Method Details

#==(other) ⇒ true, false

Returns true if two iterations are the sames i.e they share the same id attribute

Parameters:

  • other (Iteration)

    the other object to compare

Returns:

  • (true, false)


67
68
69
# File 'lib/trajectory/domain/iteration.rb', line 67

def ==(other)
  id == other.id
end

#accepted_pointsInteger

Sum of points accepted stories in the iteration

Returns:

  • (Integer)

    number of accepted points



37
# File 'lib/trajectory/domain/iteration.rb', line 37

attribute :accepted_points, Integer

#accepted_stories_countInteger

Returns bumber of accepted stories.

Returns:

  • (Integer)

    bumber of accepted stories



45
# File 'lib/trajectory/domain/iteration.rb', line 45

attribute :accepted_stories_count, Integer

#comments_countInteger

Returns number of comments of the story.

Returns:

  • (Integer)

    number of comments of the story



43
# File 'lib/trajectory/domain/iteration.rb', line 43

attribute :comments_count, Integer

#complete?true, false Also known as: past?

Return true if the iteration has been completed, false otherwise

Returns:

  • (true, false)

    return true if the iteration has been completed, false otherwise



33
# File 'lib/trajectory/domain/iteration.rb', line 33

attribute :complete, Boolean

#created_atDateTime

Returns creation date of the iteration.

Returns:

  • (DateTime)

    creation date of the iteration



15
# File 'lib/trajectory/domain/iteration.rb', line 15

attribute :created_at, DateTime

#current?true, false

Returns true if iteration is the current iteration, false otherwise.

Returns:

  • (true, false)

    true if iteration is the current iteration, false otherwise



28
# File 'lib/trajectory/domain/iteration.rb', line 28

attribute :current, Boolean

#delivered_stories_countInteger

Returns number of delivered stories in the iteration.

Returns:

  • (Integer)

    number of delivered stories in the iteration



19
# File 'lib/trajectory/domain/iteration.rb', line 19

attribute :delivered_stories_count, Integer

#estimated_pointsInteger

Sum of all points of all stories of the iteration

Returns:

  • (Integer)

    number of estimated points



41
# File 'lib/trajectory/domain/iteration.rb', line 41

attribute :estimated_points, Integer

#estimated_velocityInteger

Returns estimated velocity of the project.

Returns:

  • (Integer)

    estimated velocity of the project



17
# File 'lib/trajectory/domain/iteration.rb', line 17

attribute :estimated_velocity, Integer

#future?Boolean

Returns true if the iteration is a future one i.e not started and not completed

Returns:

  • (Boolean)


58
59
60
# File 'lib/trajectory/domain/iteration.rb', line 58

def future?
  !current? && !complete?
end

#idInteger

Returns the unique identifier of the iteration.

Returns:

  • (Integer)

    the unique identifier of the iteration.

Raises:



9
# File 'lib/trajectory/domain/iteration.rb', line 9

attribute :id, Integer, default: lambda { |project, attribute| raise MissingAttributeError.new(project, :id) }

#percent_completeFloat

Returns the completion percentage of the iteration.

Returns:

  • (Float)

    the completion percentage of the iteration



11
# File 'lib/trajectory/domain/iteration.rb', line 11

attribute :percent_complete, Float

#project_idInteger

Returns d of the project the iteration belongs to.

Returns:

  • (Integer)

    d of the project the iteration belongs to

See Also:



48
# File 'lib/trajectory/domain/iteration.rb', line 48

attribute :project_id, Integer

#started_stories_countInteger

Returns number of started stories in the iteration.

Returns:

  • (Integer)

    number of started stories in the iteration



13
# File 'lib/trajectory/domain/iteration.rb', line 13

attribute :started_stories_count, Integer

#starts_onDateTime

Returns start date of the iteration.

Returns:

  • (DateTime)

    start date of the iteration



25
# File 'lib/trajectory/domain/iteration.rb', line 25

attribute :starts_on, DateTime

#storiesStories

Fetch the stories that belongs to the iteration

Returns:

  • (Stories)

    the stories collection



81
82
83
# File 'lib/trajectory/domain/iteration.rb', line 81

def stories
  project.stories_in_iteration(self)
end

#stories_countInteger

Returns number of stories in the iteration.

Returns:

  • (Integer)

    number of stories in the iteration



30
# File 'lib/trajectory/domain/iteration.rb', line 30

attribute :stories_count, Integer

#unstarted_stories_countInteger

Returns number of unstarted stories.

Returns:

  • (Integer)

    number of unstarted stories



23
# File 'lib/trajectory/domain/iteration.rb', line 23

attribute :unstarted_stories_count, Integer

#updated_atDateTime

Returns last modification date of the iteration.

Returns:

  • (DateTime)

    last modification date of the iteration



21
# File 'lib/trajectory/domain/iteration.rb', line 21

attribute :updated_at, DateTime