Class: Tabry::Models::IncludeSub
- Inherits:
-
Object
- Object
- Tabry::Models::IncludeSub
- Defined in:
- lib/tabry/models/include_sub.rb
Instance Attribute Summary collapse
-
#_root ⇒ Object
readonly
Returns the value of attribute _root.
-
#include_name ⇒ Object
readonly
Returns the value of attribute include_name.
Instance Method Summary collapse
- #flatten ⇒ Object
-
#initialize(raw:, root:) ⇒ IncludeSub
constructor
A new instance of IncludeSub.
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
#_root ⇒ Object (readonly)
Returns the value of attribute _root.
6 7 8 |
# File 'lib/tabry/models/include_sub.rb', line 6 def _root @_root end |
#include_name ⇒ Object (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
#flatten ⇒ Object
13 14 15 |
# File 'lib/tabry/models/include_sub.rb', line 13 def flatten _root.arg_includes[include_name].subs.flatten end |