Sha256: 121028b11537ce9467db6273e78cfaf7eea233d42551c3b716f4a3ad784e3aa3

Contents?: true

Size: 535 Bytes

Versions: 2

Compression:

Stored size: 535 Bytes

Contents

# frozen_string_literal: true

module Balboa
  module Interactor
    class CapybaraInteractor
      def initialize(options)
        @options = options
        @commands = {}
      end
      
      def add_command(key, command)
        @commands[key.to_s] = command
      end

      def last_punch
        login
        @commands['last_punch'].execute
      end

      def punch(date)
        @commands['make_punch'].execute(date)
      end

      private

      def login
        @commands['login'].execute
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
balboa-0.1.1 lib/balboa/interactor/capybara_interactor.rb
balboa-0.1.0 lib/balboa/interactor/capybara_interactor.rb