Class: Space::App::Handler
- Inherits:
-
Object
- Object
- Space::App::Handler
- Defined in:
- lib/space/app/handler.rb
Constant Summary collapse
- ALIASES =
{ '' => 'scope', '-' => 'unscope', 'r' => 'refresh' }
Instance Attribute Summary collapse
-
#project ⇒ Object
readonly
Returns the value of attribute project.
Instance Method Summary collapse
-
#initialize(project) ⇒ Handler
constructor
A new instance of Handler.
- #run(line) ⇒ Object
Constructor Details
#initialize(project) ⇒ Handler
Returns a new instance of Handler.
11 12 13 |
# File 'lib/space/app/handler.rb', line 11 def initialize(project) @project = project end |
Instance Attribute Details
#project ⇒ Object (readonly)
Returns the value of attribute project.
9 10 11 |
# File 'lib/space/app/handler.rb', line 9 def project @project end |
Instance Method Details
#run(line) ⇒ Object
15 16 17 18 19 |
# File 'lib/space/app/handler.rb', line 15 def run(line) scope, type = parse(line) command = command_for(scope, type) command.run end |