Class: RubyLeiningen::Commands::Config
- Inherits:
-
Object
- Object
- RubyLeiningen::Commands::Config
- Defined in:
- lib/ruby_leiningen/commands.rb
Instance Attribute Summary collapse
-
#command_block ⇒ Object
Returns the value of attribute command_block.
-
#subcommand_block ⇒ Object
Returns the value of attribute subcommand_block.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #on_command_builder(&block) ⇒ Object
- #on_subcommand_builder(&block) ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
53 54 55 56 |
# File 'lib/ruby_leiningen/commands.rb', line 53 def initialize self.command_block = lambda { |command| command } self.subcommand_block = lambda { |sub| sub } end |
Instance Attribute Details
#command_block ⇒ Object
Returns the value of attribute command_block.
51 52 53 |
# File 'lib/ruby_leiningen/commands.rb', line 51 def command_block @command_block end |
#subcommand_block ⇒ Object
Returns the value of attribute subcommand_block.
51 52 53 |
# File 'lib/ruby_leiningen/commands.rb', line 51 def subcommand_block @subcommand_block end |
Instance Method Details
#on_command_builder(&block) ⇒ Object
58 59 60 61 |
# File 'lib/ruby_leiningen/commands.rb', line 58 def on_command_builder(&block) self.command_block = block self end |
#on_subcommand_builder(&block) ⇒ Object
63 64 65 66 |
# File 'lib/ruby_leiningen/commands.rb', line 63 def on_subcommand_builder(&block) self.subcommand_block = block self end |