Class: Elasticshell::Commands::Pretty
Instance Attribute Summary
#input, #shell
Class Method Summary
collapse
Instance Method Summary
collapse
#be_connected!, #initialize
Class Method Details
.matches?(input) ⇒ Boolean
5
6
7
|
# File 'lib/elasticshell/commands/pretty.rb', line 5
def self.matches? input
input =~ /^pretty/i
end
|
Instance Method Details
#evaluate! ⇒ Object
9
10
11
12
13
14
15
|
# File 'lib/elasticshell/commands/pretty.rb', line 9
def evaluate!
if shell.pretty?
shell.not_pretty!
else
shell.pretty!
end
end
|