Module: DDSL::Command::DSL::InstanceMethods

Defined in:
lib/ddsl/command/dsl.rb

Constant Summary collapse

DEFAULT_OPTIONS_TRANSFORMER =
->(_x) { [] }
DEFAULT_ARGUMENTS_TRANSFORMER =
->(_x) { {} }

Instance Method Summary collapse

Instance Method Details

#after_blockObject



75
76
77
# File 'lib/ddsl/command/dsl.rb', line 75

def after_block
  search_ancestor_tree_variable(:@after_block)
end

#argumentsObject



67
68
69
# File 'lib/ddsl/command/dsl.rb', line 67

def arguments
  search_ancestor_tree_variable(:@arguments) || DEFAULT_ARGUMENTS_TRANSFORMER
end

#before_blockObject



71
72
73
# File 'lib/ddsl/command/dsl.rb', line 71

def before_block
  search_ancestor_tree_variable(:@before_block)
end

#commandObject



83
84
85
# File 'lib/ddsl/command/dsl.rb', line 83

def command
  search_ancestor_tree_variable(:@command)
end

#executableObject



79
80
81
# File 'lib/ddsl/command/dsl.rb', line 79

def executable
  search_ancestor_tree_variable(:@executable)
end

#executable_optionsObject



59
60
61
# File 'lib/ddsl/command/dsl.rb', line 59

def executable_options
  search_ancestor_tree_variable(:@executable_options) || DEFAULT_OPTIONS_TRANSFORMER
end

#optionsObject



63
64
65
# File 'lib/ddsl/command/dsl.rb', line 63

def options
  search_ancestor_tree_variable(:@options) || DEFAULT_OPTIONS_TRANSFORMER
end