class Stax::SubCommand

Public Class Methods

stax_info(*tasks) click to toggle source
# File lib/stax/subcommand.rb, line 5
def stax_info(*tasks)
  @stax_info_tasks ||= []
  @stax_info_tasks += tasks
end
stax_info_tasks() click to toggle source
# File lib/stax/subcommand.rb, line 10
def stax_info_tasks
  @stax_info_tasks&.uniq
end

Public Instance Methods

info() click to toggle source
# File lib/stax/subcommand.rb, line 23
def info
  self.class.stax_info_tasks&.each do |task|
    begin
      invoke task
      puts "\n"
    rescue NoMethodError => e
      warn(e.message)
    end
  end
end
my() click to toggle source

return the Stack instance that called this subcommand

# File lib/stax/subcommand.rb, line 17
def my
  @_my ||= stack(current_command_chain.first)
end