Class: KDirector::Directors::ChildDirector

Inherits:
BaseDirector show all
Defined in:
lib/k_director/directors/child_director.rb

Overview

Child directors hang of a parent director and provide fluent builders for specialized flow control, e.g branching of a RubyGem Director into a GitHub Child director

Instance Attribute Summary collapse

Attributes inherited from BaseDirector

#builder, #k_builder, #options

Instance Method Summary collapse

Methods inherited from BaseDirector

#active?, #add, #add_clipboard, #add_file, #blueprint, builder_type, #configuration, #data, #debug_dom, #debug_options, default_builder_type, default_on_action, default_on_exist, defaults, #director_name, #director_name=, #dom, #fadd, #github, #inherited_opts, init, #json_dom, #oadd, #on_action, on_action, #on_exist, on_exist, #package_json, #play_actions, #run_command, #run_script, #set_current_folder_action, #settings, #tadd, #template_base_folder, #typed_dom

Constructor Details

#initialize(parent, **opts) ⇒ ChildDirector

Returns a new instance of ChildDirector.



11
12
13
14
15
# File 'lib/k_director/directors/child_director.rb', line 11

def initialize(parent, **opts)
  @parent = parent

  super(parent.k_builder, parent.builder, **@parent.inherited_opts(**opts))
end

Instance Attribute Details

#parentObject (readonly)

Returns the value of attribute parent.



9
10
11
# File 'lib/k_director/directors/child_director.rb', line 9

def parent
  @parent
end

Instance Method Details

#debugObject



17
18
19
20
21
# File 'lib/k_director/directors/child_director.rb', line 17

def debug
  parent.debug_options
  debug_options
  debug_dom
end