class Fitting::Configuration::Yaml
Attributes
apib_path[RW]
crafter_apib_path[RW]
crafter_yaml_path[RW]
drafter_4_apib_path[RW]
drafter_4_yaml_path[RW]
drafter_yaml_path[RW]
ignore_list[RW]
include_actions[RW]
include_resources[RW]
prefix[RW]
resource_white_list[RW]
strict[RW]
title[R]
tomogram_json_path[RW]
white_list[RW]
Public Class Methods
new(yaml, title = 'fitting')
click to toggle source
# File lib/fitting/configuration/yaml.rb, line 22 def initialize(yaml, title = 'fitting') @apib_path = yaml['apib_path'] @drafter_yaml_path = yaml['drafter_yaml_path'] @crafter_apib_path = yaml['crafter_apib_path'] @crafter_yaml_path = yaml['crafter_yaml_path'] @drafter_4_apib_path = yaml['drafter_4_apib_path'] @drafter_4_yaml_path = yaml['drafter_4_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
Public Instance Methods
not_covered_path()
click to toggle source
# File lib/fitting/configuration/yaml.rb, line 72 def not_covered_path if @title == 'fitting' 'fitting/not_covered' else "fitting/#{@title}/not_covered" end end
stats_path()
click to toggle source
# File lib/fitting/configuration/yaml.rb, line 64 def stats_path if @title == 'fitting' 'fitting/stats' else "fitting/#{@title}/stats" end end
tomogram()
click to toggle source
# File lib/fitting/configuration/yaml.rb, line 41 def tomogram @tomogram ||= if @crafter_yaml_path || @crafter_apib_path Tomograph::Tomogram.new( prefix: @prefix, crafter_apib_path: @crafter_apib_path, crafter_yaml_path: @crafter_yaml_path, ) elsif @drafter_4_apib_path || @drafter_4_yaml_path Tomograph::Tomogram.new( prefix: @prefix, drafter_4_apib_path: @drafter_4_apib_path, drafter_4_yaml_path: @drafter_4_yaml_path, ) else Tomograph::Tomogram.new( prefix: @prefix, apib_path: @apib_path, drafter_yaml_path: @drafter_yaml_path, tomogram_json_path: @tomogram_json_path ) end end
Private Instance Methods
default()
click to toggle source
# File lib/fitting/configuration/yaml.rb, line 82 def default @strict ||= false if @strict.nil? @prefix ||= '' @ignore_list ||= [] end