Module: DDSL::Command::DSL::ClassMethods
- Defined in:
- lib/ddsl/command/dsl.rb
Instance Method Summary collapse
- #after(&block) ⇒ Object
- #arguments(&block) ⇒ Object
- #before(&block) ⇒ Object
- #command(name) ⇒ Object
- #executable(name) ⇒ Object
- #executable_options(&block) ⇒ Object
- #options(&block) ⇒ Object
Instance Method Details
#after(&block) ⇒ Object
48 49 50 51 52 |
# File 'lib/ddsl/command/dsl.rb', line 48 def after(&block) singleton_class.class_eval do @after_block = block end end |
#arguments(&block) ⇒ Object
24 25 26 27 28 |
# File 'lib/ddsl/command/dsl.rb', line 24 def arguments(&block) singleton_class.class_eval do @arguments = Transproc::Transformer[Functions].define(&block) end end |
#before(&block) ⇒ Object
42 43 44 45 46 |
# File 'lib/ddsl/command/dsl.rb', line 42 def before(&block) singleton_class.class_eval do @before_block = block end end |
#command(name) ⇒ Object
36 37 38 39 40 |
# File 'lib/ddsl/command/dsl.rb', line 36 def command(name) singleton_class.class_eval do @command = name end end |
#executable(name) ⇒ Object
30 31 32 33 34 |
# File 'lib/ddsl/command/dsl.rb', line 30 def executable(name) singleton_class.class_eval do @executable = name end end |
#executable_options(&block) ⇒ Object
12 13 14 15 16 |
# File 'lib/ddsl/command/dsl.rb', line 12 def (&block) singleton_class.class_eval do @executable_options = Transproc::Transformer[Functions].define(&block) end end |
#options(&block) ⇒ Object
18 19 20 21 22 |
# File 'lib/ddsl/command/dsl.rb', line 18 def (&block) singleton_class.class_eval do @options = Transproc::Transformer[Functions].define(&block) end end |