Class: BoardConfig
- Inherits:
-
Object
- Object
- BoardConfig
- Defined in:
- lib/jirametrics/board_config.rb
Instance Attribute Summary collapse
-
#board ⇒ Object
readonly
Returns the value of attribute board.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#project_config ⇒ Object
readonly
Returns the value of attribute project_config.
Instance Method Summary collapse
- #cycletime(label = nil, &block) ⇒ Object
- #expedited_priority_names(*priority_names) ⇒ Object
-
#initialize(id:, block:, project_config:) ⇒ BoardConfig
constructor
A new instance of BoardConfig.
- #run ⇒ Object
Constructor Details
#initialize(id:, block:, project_config:) ⇒ BoardConfig
Returns a new instance of BoardConfig.
6 7 8 9 10 |
# File 'lib/jirametrics/board_config.rb', line 6 def initialize id:, block:, project_config: @id = id @block = block @project_config = project_config end |
Instance Attribute Details
#board ⇒ Object (readonly)
Returns the value of attribute board.
4 5 6 |
# File 'lib/jirametrics/board_config.rb', line 4 def board @board end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/jirametrics/board_config.rb', line 4 def id @id end |
#project_config ⇒ Object (readonly)
Returns the value of attribute project_config.
4 5 6 |
# File 'lib/jirametrics/board_config.rb', line 4 def project_config @project_config end |
Instance Method Details
#cycletime(label = nil, &block) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/jirametrics/board_config.rb', line 20 def cycletime label = nil, &block if @board.cycletime raise "Cycletime has already been set for board #{id}. Did you also set it inside the html_report? " \ 'If so, remove it from there.' end @board.cycletime = CycleTimeConfig.new( parent_config: self, label: label, block: block, file_system: project_config.file_system, settings: project_config.settings ) end |
#expedited_priority_names(*priority_names) ⇒ Object
32 33 34 35 36 37 |
# File 'lib/jirametrics/board_config.rb', line 32 def expedited_priority_names *priority_names project_config.exporter.file_system.deprecated( date: '2024-09-15', message: 'Expedited priority names are now specified in settings' ) @project_config.settings['expedited_priority_names'] = priority_names end |
#run ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/jirametrics/board_config.rb', line 12 def run @board = @project_config.all_boards[id] raise "Can't find board #{id.inspect} in #{@project_config.all_boards.keys.inspect}" unless @board instance_eval(&@block) raise "Must specify a cycletime for board #{@id}" if @board.cycletime.nil? end |