Class: Fitting::Configuration::Yaml
- Inherits:
-
Object
- Object
- Fitting::Configuration::Yaml
- Defined in:
- lib/fitting/configuration/yaml.rb
Instance Attribute Summary collapse
-
#apib_path ⇒ Object
Returns the value of attribute apib_path.
-
#drafter_yaml_path ⇒ Object
Returns the value of attribute drafter_yaml_path.
-
#ignore_list ⇒ Object
Returns the value of attribute ignore_list.
-
#include_actions ⇒ Object
Returns the value of attribute include_actions.
-
#include_resources ⇒ Object
Returns the value of attribute include_resources.
-
#prefix ⇒ Object
Returns the value of attribute prefix.
-
#resource_white_list ⇒ Object
Returns the value of attribute resource_white_list.
-
#strict ⇒ Object
Returns the value of attribute strict.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#tomogram_json_path ⇒ Object
Returns the value of attribute tomogram_json_path.
-
#white_list ⇒ Object
Returns the value of attribute white_list.
Instance Method Summary collapse
-
#initialize(yaml, title = 'fitting') ⇒ Yaml
constructor
A new instance of Yaml.
- #not_covered_path ⇒ Object
- #stats_path ⇒ Object
- #tomogram ⇒ Object
Constructor Details
#initialize(yaml, title = 'fitting') ⇒ Yaml
Returns a new instance of Yaml.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/fitting/configuration/yaml.rb', line 18 def initialize(yaml, title = 'fitting') @apib_path = yaml['apib_path'] @drafter_yaml_path = yaml['drafter_yaml_path'] @tomogram_json_path = yaml['tomogram_json_path'] @strict = yaml['strict'] @prefix = yaml['prefix'] @white_list = yaml['white_list'] @resource_white_list = yaml['resource_white_list'] @ignore_list = yaml['ignore_list'] @include_resources = yaml['include_resources'] @include_actions = yaml['include_actions'] @title = title default end |
Instance Attribute Details
#apib_path ⇒ Object
Returns the value of attribute apib_path.
7 8 9 |
# File 'lib/fitting/configuration/yaml.rb', line 7 def apib_path @apib_path end |
#drafter_yaml_path ⇒ Object
Returns the value of attribute drafter_yaml_path.
7 8 9 |
# File 'lib/fitting/configuration/yaml.rb', line 7 def drafter_yaml_path @drafter_yaml_path end |
#ignore_list ⇒ Object
Returns the value of attribute ignore_list.
7 8 9 |
# File 'lib/fitting/configuration/yaml.rb', line 7 def ignore_list @ignore_list end |
#include_actions ⇒ Object
Returns the value of attribute include_actions.
7 8 9 |
# File 'lib/fitting/configuration/yaml.rb', line 7 def include_actions @include_actions end |
#include_resources ⇒ Object
Returns the value of attribute include_resources.
7 8 9 |
# File 'lib/fitting/configuration/yaml.rb', line 7 def include_resources @include_resources end |
#prefix ⇒ Object
Returns the value of attribute prefix.
7 8 9 |
# File 'lib/fitting/configuration/yaml.rb', line 7 def prefix @prefix end |
#resource_white_list ⇒ Object
Returns the value of attribute resource_white_list.
7 8 9 |
# File 'lib/fitting/configuration/yaml.rb', line 7 def resource_white_list @resource_white_list end |
#strict ⇒ Object
Returns the value of attribute strict.
7 8 9 |
# File 'lib/fitting/configuration/yaml.rb', line 7 def strict @strict end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
6 7 8 |
# File 'lib/fitting/configuration/yaml.rb', line 6 def title @title end |
#tomogram_json_path ⇒ Object
Returns the value of attribute tomogram_json_path.
7 8 9 |
# File 'lib/fitting/configuration/yaml.rb', line 7 def tomogram_json_path @tomogram_json_path end |
#white_list ⇒ Object
Returns the value of attribute white_list.
7 8 9 |
# File 'lib/fitting/configuration/yaml.rb', line 7 def white_list @white_list end |
Instance Method Details
#not_covered_path ⇒ Object
50 51 52 53 54 55 56 |
# File 'lib/fitting/configuration/yaml.rb', line 50 def not_covered_path if @title == 'fitting' 'fitting/not_covered' else "fitting/#{@title}/not_covered" end end |
#stats_path ⇒ Object
42 43 44 45 46 47 48 |
# File 'lib/fitting/configuration/yaml.rb', line 42 def stats_path if @title == 'fitting' 'fitting/stats' else "fitting/#{@title}/stats" end end |
#tomogram ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'lib/fitting/configuration/yaml.rb', line 33 def tomogram @tomogram ||= Tomograph::Tomogram.new( prefix: @prefix, apib_path: @apib_path, drafter_yaml_path: @drafter_yaml_path, tomogram_json_path: @tomogram_json_path ) end |