Class: Elasticshell::Commands::SetVerb
- Inherits:
-
Elasticshell::Command
- Object
- Elasticshell::Command
- Elasticshell::Commands::SetVerb
- Extended by:
- RecognizesVerb
- Includes:
- RecognizesVerb
- Defined in:
- lib/elasticshell/commands/set_verb.rb
Constant Summary
Constants included from RecognizesVerb
Instance Attribute Summary
Attributes inherited from Elasticshell::Command
Class Method Summary collapse
Instance Method Summary collapse
Methods included from RecognizesVerb
canonicalize_verb, is_http_verb?, verb_re
Methods inherited from Elasticshell::Command
Constructor Details
This class inherits a constructor from Elasticshell::Command
Class Method Details
.matches?(input) ⇒ Boolean
10 11 12 |
# File 'lib/elasticshell/commands/set_verb.rb', line 10 def self.matches? input is_http_verb?(input) end |
Instance Method Details
#evaluate! ⇒ Object
14 15 16 17 18 |
# File 'lib/elasticshell/commands/set_verb.rb', line 14 def evaluate! v = canonicalize_verb(input) shell.verb = v shell.scope.verb = v end |