Class: RubyLeiningen::Commands::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_leiningen/commands.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig



41
42
43
44
# File 'lib/ruby_leiningen/commands.rb', line 41

def initialize
  self.command_block = lambda { |com, _| com }
  self.subcommand_block = lambda { |sub, _| sub }
end

Instance Attribute Details

#command_blockObject

Returns the value of attribute command_block.



39
40
41
# File 'lib/ruby_leiningen/commands.rb', line 39

def command_block
  @command_block
end

#subcommand_blockObject

Returns the value of attribute subcommand_block.



39
40
41
# File 'lib/ruby_leiningen/commands.rb', line 39

def subcommand_block
  @subcommand_block
end

Instance Method Details

#on_command_builder(&block) ⇒ Object



46
47
48
49
# File 'lib/ruby_leiningen/commands.rb', line 46

def on_command_builder(&block)
  self.command_block = block
  self
end

#on_subcommand_builder(&block) ⇒ Object



51
52
53
54
# File 'lib/ruby_leiningen/commands.rb', line 51

def on_subcommand_builder(&block)
  self.subcommand_block = block
  self
end