Class: Lita::Alias::AliasedCommand
- Inherits:
-
Object
- Object
- Lita::Alias::AliasedCommand
- Defined in:
- lib/lita/alias/aliased_command.rb
Overview
A single aliased command
Instance Attribute Summary collapse
-
#command ⇒ Object
Returns the value of attribute command.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name = nil, command = nil) ⇒ AliasedCommand
constructor
A new instance of AliasedCommand.
-
#valid? ⇒ Boolean
Returns true if the object is valid.
Constructor Details
#initialize(name = nil, command = nil) ⇒ AliasedCommand
Returns a new instance of AliasedCommand.
7 8 9 10 |
# File 'lib/lita/alias/aliased_command.rb', line 7 def initialize(name = nil, command = nil) @name = name @command = command end |
Instance Attribute Details
#command ⇒ Object
Returns the value of attribute command.
5 6 7 |
# File 'lib/lita/alias/aliased_command.rb', line 5 def command @command end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/lita/alias/aliased_command.rb', line 5 def name @name end |
Instance Method Details
#valid? ⇒ Boolean
Returns true if the object is valid. False otherwise
14 15 16 17 |
# File 'lib/lita/alias/aliased_command.rb', line 14 def valid? # for now, just validate the name and command are not nil @name && @command end |