Module: TbHeavyControl::Configurable

Included in:
TbHeavyControl
Defined in:
lib/tb_heavy_control/configurable.rb

Constant Summary collapse

CONST_CHECK_SKIP =
%w(operations views concepts).freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#pipelineObject (readonly)

Returns the value of attribute pipeline.



5
6
7
# File 'lib/tb_heavy_control/configurable.rb', line 5

def pipeline
  @pipeline
end

Instance Method Details

#config(&block) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/tb_heavy_control/configurable.rb', line 7

def config(&block)
  raise 'tb_heavy_control config cannot run without block' if block.nil?
  @pipeline ||= [] # Pathname means load file, String - check constant
  @context = Rails.root.join('app', 'concepts')

  instance_eval(&block)
end

#debug(arg = nil) ⇒ Object



15
16
17
18
# File 'lib/tb_heavy_control/configurable.rb', line 15

def debug(arg = nil)
  @debug = arg unless arg.nil?
  @debug
end