Class: Tabry::Models::IncludeSub

Inherits:
Object
  • Object
show all
Defined in:
lib/tabry/models/include_sub.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw:, root:) ⇒ IncludeSub

Returns a new instance of IncludeSub.



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

def initialize(raw:, root:)
  @include_name = raw["include"]
  @_root = root
end

Instance Attribute Details

#_rootObject (readonly)

Returns the value of attribute _root.



6
7
8
# File 'lib/tabry/models/include_sub.rb', line 6

def _root
  @_root
end

#include_nameObject (readonly)

Returns the value of attribute include_name.



6
7
8
# File 'lib/tabry/models/include_sub.rb', line 6

def include_name
  @include_name
end

Instance Method Details

#flattenObject



13
14
15
# File 'lib/tabry/models/include_sub.rb', line 13

def flatten
  _root.arg_includes[include_name].subs.flatten
end