Sha256: 7b55aa8a78627af01fd7b751f170717c49b9fc09e77f24e0981af7482601d5f3

Contents?: true

Size: 485 Bytes

Versions: 1

Compression:

Stored size: 485 Bytes

Contents

# frozen_string_literal: true

require "akashiyaki/client"

module Akashiyaki
  class Command
    attr_reader :mode, :action, :account

    def initialize(mode, action, account)
      @mode = mode
      @action = action
      @account = account
    end

    def run
      client.send(:"#{action}_#{mode}")
    end

    private

    def client
      @client ||=
        Client.new(
          account.company,
          account.id,
          account.password
        )
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
akashiyaki-0.2.0 lib/akashiyaki/command.rb