class EverydayThorUtil::BuilderBuildLists::BuilderCommands

Public Class Methods

new(parent) click to toggle source
# File lib/everyday_thor_util/builder.rb, line 143
def initialize(parent)
  @parent   = parent
  @commands = {}
end

Public Instance Methods

[](name) click to toggle source
# File lib/everyday_thor_util/builder.rb, line 152
def [](name)
  @commands[name.to_sym]
end
[]=(name, command) click to toggle source
# File lib/everyday_thor_util/builder.rb, line 156
def []=(name, command)
  if command.nil?
    delete(name)
    nil
  else
    @parent.helpers.delete(name) if @parent.helpers.has_key?(name)
    @commands[name.to_sym] = EverydayThorUtil::BuilderBuildItems::BuilderCommand.new(@parent, command.options, &command.body)
  end
end
commands() click to toggle source
# File lib/everyday_thor_util/builder.rb, line 148
def commands
  @commands
end
delete(name) click to toggle source
# File lib/everyday_thor_util/builder.rb, line 170
def delete(name)
  @commands.delete(name.to_sym)
end
has_key?(name) click to toggle source
# File lib/everyday_thor_util/builder.rb, line 166
def has_key?(name)
  @commands.has_key?(name.to_sym)
end