Sha256: 2083eb27cb8684425a6b062610f366cc42653ac7c1ab0d78bca73cf4697ce103

Contents?: true

Size: 920 Bytes

Versions: 60

Compression:

Stored size: 920 Bytes

Contents

module Eco
  module API
    class Session
      class Config
        class Api < Hash

          def initialize(key:, host:, version:, mode: :local, root:)
            super(nil)
            @root = root
            self["key"]      =  key
            self["host"]     = host
            self["version"]  = version
            self["mode"]     = mode
          end

          def key
            self["key"]
          end

          def host
            self["host"]
          end

          def mode=(mode)
            self["mode"] = (mode == :remote)? :remote : :local
          end

          def mode
            self["mode"]
          end

          def local?
            mode == :local
          end

          def remote?
            !local?
          end

          def version
            self["version"]
          end


        end
      end
    end
  end
end

Version data entries

60 entries across 60 versions & 1 rubygems

Version Path
eco-helpers-1.0.7 lib/eco/api/session/config/api.rb
eco-helpers-1.0.6 lib/eco/api/session/config/api.rb
eco-helpers-1.0.5 lib/eco/api/session/config/api.rb
eco-helpers-1.0.4 lib/eco/api/session/config/api.rb
eco-helpers-1.0.3 lib/eco/api/session/config/api.rb
eco-helpers-0.9.5 lib/eco/api/session/config/api.rb
eco-helpers-1.0.2 lib/eco/api/session/config/api.rb
eco-helpers-0.9.4 lib/eco/api/session/config/api.rb
eco-helpers-0.9.3 lib/eco/api/session/config/api.rb
eco-helpers-0.9.2 lib/eco/api/session/config/api.rb
eco-helpers-0.9.1 lib/eco/api/session/config/api.rb
eco-helpers-0.8.4 lib/eco/api/session/config/api.rb
eco-helpers-0.8.3 lib/eco/api/session/config/api.rb
eco-helpers-0.8.2 lib/eco/api/session/config/api.rb
eco-helpers-0.8.1 lib/eco/api/session/config/api.rb
eco-helpers-0.7.2 lib/eco/api/session/config/api.rb
eco-helpers-0.7.1 lib/eco/api/session/config/api.rb
eco-helpers-0.6.17 lib/eco/api/session/config/api.rb
eco-helpers-0.6.16 lib/eco/api/session/config/api.rb
eco-helpers-0.6.15 lib/eco/api/session/config/api.rb