Class: Clubhouse::Milestone

Inherits:
ClubhouseResource show all
Defined in:
lib/clubhouse2/milestone.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ClubhouseResource

#api_url, #delete!, #flush, inherited, #initialize, property_filter_create, property_filter_update, #resolve_to_ids, #set_properties, subclass, #to_h, #update, validate, #value_format

Constructor Details

This class inherits a constructor from Clubhouse::ClubhouseResource

Class Method Details

.api_urlObject



10
11
12
# File 'lib/clubhouse2/milestone.rb', line 10

def self.api_url
	'milestones'
end

.propertiesObject



3
4
5
6
7
8
# File 'lib/clubhouse2/milestone.rb', line 3

def self.properties
	[
		:categories, :completed, :completed_at, :completed_at_override, :created_at, :description, :entity_type,
		:id, :name, :position, :started, :started_at, :started_at_override, :state, :updated_at
	]
end

Instance Method Details

#epicsObject



14
15
16
# File 'lib/clubhouse2/milestone.rb', line 14

def epics
	@client.epics.select { |e| e.milestone_id == @id }			
end

#storiesObject



18
19
20
# File 'lib/clubhouse2/milestone.rb', line 18

def stories
	epics.collect(&:stories).reduce(:+)
end