Class: InteractiveS3::Interpreter
- Inherits:
-
Object
- Object
- InteractiveS3::Interpreter
- Extended by:
- Forwardable
- Defined in:
- lib/interactive_s3/interpreter.rb
Instance Attribute Summary collapse
-
#s3 ⇒ Object
readonly
Returns the value of attribute s3.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Instance Method Summary collapse
- #execute(input) ⇒ Object
-
#initialize ⇒ Interpreter
constructor
A new instance of Interpreter.
Constructor Details
#initialize ⇒ Interpreter
Returns a new instance of Interpreter.
11 12 13 14 |
# File 'lib/interactive_s3/interpreter.rb', line 11 def initialize @s3 = S3.new @state = {} end |
Instance Attribute Details
#s3 ⇒ Object (readonly)
Returns the value of attribute s3.
7 8 9 |
# File 'lib/interactive_s3/interpreter.rb', line 7 def s3 @s3 end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
7 8 9 |
# File 'lib/interactive_s3/interpreter.rb', line 7 def state @state end |
Instance Method Details
#execute(input) ⇒ Object
16 17 18 19 20 |
# File 'lib/interactive_s3/interpreter.rb', line 16 def execute(input) build_command(input).execute rescue CommandError => e puts e.class, e., e.backtrace.join("\n") end |