Class: Hexagonal::Runners::FilterRunner

Inherits:
Object
  • Object
show all
Defined in:
lib/hexagonal/runners/filter_runner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(listener, user, attributes = nil) ⇒ FilterRunner

Returns a new instance of FilterRunner.



8
9
10
11
12
# File 'lib/hexagonal/runners/filter_runner.rb', line 8

def initialize(listener, user, attributes = nil)
  @listener   = listener
  @user       = user
  @attributes = attributes
end

Instance Attribute Details

#form=(value) ⇒ Object (writeonly)

Sets the attribute form

Parameters:

  • value

    the value to set the attribute form to.



4
5
6
# File 'lib/hexagonal/runners/filter_runner.rb', line 4

def form=(value)
  @form = value
end

#repository=(value) ⇒ Object (writeonly)

Sets the attribute repository

Parameters:

  • value

    the value to set the attribute repository to.



4
5
6
# File 'lib/hexagonal/runners/filter_runner.rb', line 4

def repository=(value)
  @repository = value
end

Instance Method Details

#runObject



14
15
16
17
18
19
# File 'lib/hexagonal/runners/filter_runner.rb', line 14

def run
  validate! if attributes
  found items
rescue Hexagonal::Errors::RecordInvalidException => ex
  invalid ex
end