Class: Mysh::ExecHost
Overview
The mysh ruby expression processor.
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
The result of the previous expression.
Instance Method Summary collapse
-
#execute(str) ⇒ Object
Process an expression.
-
#reset ⇒ Object
Reset the state of the execution host.
Instance Attribute Details
#result ⇒ Object (readonly)
The result of the previous expression.
15 16 17 |
# File 'lib/mysh/expression.rb', line 15 def result @result end |
Instance Method Details
#execute(str) ⇒ Object
Process an expression.
18 19 20 21 22 23 24 |
# File 'lib/mysh/expression.rb', line 18 def execute(str) if str.start_with?('=') do_execute(str) else false end end |
#reset ⇒ Object
Reset the state of the execution host.
Endemic Code Smells
-
:reek:UtilityFunction
29 30 31 32 |
# File 'lib/mysh/expression.rb', line 29 def reset Mysh.reset_host nil end |