Class: Ego::Capability
- Inherits:
-
Object
- Object
- Ego::Capability
- Defined in:
- lib/ego/capability.rb
Overview
Note:
New capabilities should be specified by plug-ins using the
Robot#can
method.
A capability defines functionality added to a Robot
instance by a
plug-in.
Instance Attribute Summary collapse
-
#desc ⇒ Object
readonly
Returns the value of attribute desc.
-
#plugin ⇒ Object
readonly
Returns the value of attribute plugin.
Instance Method Summary collapse
-
#initialize(desc) ⇒ Capability
constructor
A new instance of Capability.
-
#to_s ⇒ String
The capability description.
Constructor Details
#initialize(desc) ⇒ Capability
Returns a new instance of Capability.
23 24 25 26 |
# File 'lib/ego/capability.rb', line 23 def initialize(desc) @desc = desc @plugin = Plugin.context end |
Instance Attribute Details
#desc ⇒ Object (readonly)
Returns the value of attribute desc.
20 21 22 |
# File 'lib/ego/capability.rb', line 20 def desc @desc end |
#plugin ⇒ Object (readonly)
Returns the value of attribute plugin.
20 21 22 |
# File 'lib/ego/capability.rb', line 20 def plugin @plugin end |
Instance Method Details
#to_s ⇒ String
Returns the capability description.
29 30 31 |
# File 'lib/ego/capability.rb', line 29 def to_s @desc end |