Class: ColumnsConfig
Instance Attribute Summary collapse
Instance Method Summary
collapse
#method_missing, #respond_to_missing?
Constructor Details
#initialize(file_config:, block:) ⇒ ColumnsConfig
Returns a new instance of ColumnsConfig.
10
11
12
13
14
|
# File 'lib/jirametrics/columns_config.rb', line 10
def initialize file_config:, block:
@columns = []
@file_config = file_config
@block = block
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class SelfOrIssueDispatcher
Instance Attribute Details
Returns the value of attribute columns.
8
9
10
|
# File 'lib/jirametrics/columns_config.rb', line 8
def columns
@columns
end
|
#file_config ⇒ Object
Returns the value of attribute file_config.
8
9
10
|
# File 'lib/jirametrics/columns_config.rb', line 8
def file_config
@file_config
end
|
Instance Method Details
#column_entry_times(board_id: nil) ⇒ Object
37
38
39
40
41
|
# File 'lib/jirametrics/columns_config.rb', line 37
def column_entry_times board_id: nil
@file_config.project_config.find_board_by_id(board_id).visible_columns.each do |column|
date column.name, first_time_in_status(*column.status_ids)
end
end
|
#date(label, proc) ⇒ Object
25
26
27
|
# File 'lib/jirametrics/columns_config.rb', line 25
def date label, proc
@columns << [:date, label, proc]
end
|
#datetime(label, proc) ⇒ Object
29
30
31
|
# File 'lib/jirametrics/columns_config.rb', line 29
def datetime label, proc
@columns << [:datetime, label, proc]
end
|
16
17
18
|
# File 'lib/jirametrics/columns_config.rb', line 16
def run
instance_eval(&@block)
end
|
#string(label, proc) ⇒ Object
33
34
35
|
# File 'lib/jirametrics/columns_config.rb', line 33
def string label, proc
@columns << [:string, label, proc]
end
|
20
21
22
23
|
# File 'lib/jirametrics/columns_config.rb', line 20
def = nil
@write_headers = unless .nil?
@write_headers
end
|