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

Returns a new instance of Config.



43
44
45
46
# File 'lib/ruby_leiningen/commands.rb', line 43

def initialize
  self.command_block = lambda { |command| command }
  self.subcommand_block = lambda { |sub| sub }
end

Instance Attribute Details

#command_blockObject

Returns the value of attribute command_block.



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

def command_block
  @command_block
end

#subcommand_blockObject

Returns the value of attribute subcommand_block.



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

def subcommand_block
  @subcommand_block
end

Instance Method Details

#on_command_builder(&block) ⇒ Object



48
49
50
51
# File 'lib/ruby_leiningen/commands.rb', line 48

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

#on_subcommand_builder(&block) ⇒ Object



53
54
55
56
# File 'lib/ruby_leiningen/commands.rb', line 53

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