Class: Balboa::Interactor::InteractorBuilder
- Inherits:
-
Object
- Object
- Balboa::Interactor::InteractorBuilder
- Defined in:
- lib/balboa/interactor/interactor_builder.rb
Class Method Summary collapse
Instance Method Summary collapse
- #create ⇒ Object
-
#initialize(options) ⇒ InteractorBuilder
constructor
A new instance of InteractorBuilder.
Constructor Details
#initialize(options) ⇒ InteractorBuilder
Returns a new instance of InteractorBuilder.
15 16 17 18 |
# File 'lib/balboa/interactor/interactor_builder.rb', line 15 def initialize() @options = @interactor = Balboa::Interactor::CapybaraInteractor.new() end |
Class Method Details
.create(*args) ⇒ Object
11 12 13 |
# File 'lib/balboa/interactor/interactor_builder.rb', line 11 def self.create(*args) new(*args).create end |
Instance Method Details
#create ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/balboa/interactor/interactor_builder.rb', line 20 def create last_punch = Balboa::Interactor::Command::FetchLastPunchCommand.new @interactor.tap do |itr| itr.add_command(:punch, fill_punch) itr.add_command(:last, last_punch) itr.add_command(:login, login) end end |