Class: AI::Commands::Command

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#arg_completeObject

Returns the value of attribute arg_complete

Returns:

  • (Object)

    the current value of arg_complete



4
5
6
# File 'lib/commands.rb', line 4

def arg_complete
  @arg_complete
end

#availableObject

Returns the value of attribute available

Returns:

  • (Object)

    the current value of available



4
5
6
# File 'lib/commands.rb', line 4

def available
  @available
end

#descObject

Returns the value of attribute desc

Returns:

  • (Object)

    the current value of desc



4
5
6
# File 'lib/commands.rb', line 4

def desc
  @desc
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



4
5
6
# File 'lib/commands.rb', line 4

def name
  @name
end

#runObject

Returns the value of attribute run

Returns:

  • (Object)

    the current value of run



4
5
6
# File 'lib/commands.rb', line 4

def run
  @run
end

Instance Method Details

#available?(app) ⇒ Boolean

Returns:

  • (Boolean)


5
# File 'lib/commands.rb', line 5

def available?(app) = available.nil? || available.call(app)