Class: Cleaner::Action

Inherits:
Object
  • Object
show all
Defined in:
lib/cleaner/action.rb

Defined Under Namespace

Classes: NotImplementedException, UnknownActionException

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(files, options = {}) ⇒ Action

Returns a new instance of Action.



5
6
7
8
# File 'lib/cleaner/action.rb', line 5

def initialize(files, options = {})
  @files = files
  @options = options
end

Instance Attribute Details

#filesObject (readonly)

Returns the value of attribute files.



3
4
5
# File 'lib/cleaner/action.rb', line 3

def files
  @files
end

#optionsObject (readonly)

Returns the value of attribute options.



3
4
5
# File 'lib/cleaner/action.rb', line 3

def options
  @options
end

Instance Method Details

#executeObject



10
11
12
# File 'lib/cleaner/action.rb', line 10

def execute
  raise NotImplementedException.new("#execute should be implemented in your Action class")
end