Class: Tabry::Models::IncludeOption

Inherits:
OptionBase show all
Defined in:
lib/tabry/models/include_option.rb

Constant Summary

Constants inherited from OptionBase

OptionBase::FIELDS

Instance Attribute Summary collapse

Attributes inherited from ConfigObject

#_raw

Instance Method Summary collapse

Methods inherited from ConfigObject

as_json, #as_json, #assert_of_class, #init_field_boolean, #init_field_list_object, #init_field_object, #init_field_string, #init_field_string_array, #initialize, #inspect, #to_s

Constructor Details

This class inherits a constructor from Tabry::Models::ConfigObject

Instance Attribute Details

#_rootObject (readonly)

Returns the value of attribute _root.



8
9
10
# File 'lib/tabry/models/include_option.rb', line 8

def _root
  @_root
end

#include_nameObject (readonly)

Returns the value of attribute include_name.



8
9
10
# File 'lib/tabry/models/include_option.rb', line 8

def include_name
  @include_name
end

Instance Method Details

#flattenObject



14
15
16
17
18
19
# File 'lib/tabry/models/include_option.rb', line 14

def flatten
  inc = _root.option_includes[value]
  raise "Bad tabry config: include #{value.inspect} not found" unless inc

  inc.flatten
end

#options(token, params) ⇒ Object



10
11
12
# File 'lib/tabry/models/include_option.rb', line 10

def options(token, params)
  flatten.options(token, params)
end