Class: InteractiveS3::Commands::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/interactive_s3/commands/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(context, name, arguments = []) ⇒ Base

Returns a new instance of Base.



7
8
9
10
11
12
# File 'lib/interactive_s3/commands/base.rb', line 7

def initialize(context, name, arguments = [])
  @s3 = context.s3
  @state = context.state
  @name = name
  @arguments = arguments
end

Instance Attribute Details

#argumentsObject

Returns the value of attribute arguments.



3
4
5
# File 'lib/interactive_s3/commands/base.rb', line 3

def arguments
  @arguments
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/interactive_s3/commands/base.rb', line 5

def name
  @name
end

#s3Object (readonly)

Returns the value of attribute s3.



5
6
7
# File 'lib/interactive_s3/commands/base.rb', line 5

def s3
  @s3
end

#stateObject

Returns the value of attribute state.



3
4
5
# File 'lib/interactive_s3/commands/base.rb', line 3

def state
  @state
end

Instance Method Details

#executeObject

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/interactive_s3/commands/base.rb', line 14

def execute
  raise NotImplementedError, "You must implement #{self.class}##{__method__}"
end