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.5.0 lib/eco/api/session/config/api.rb
eco-helpers-1.4.2 lib/eco/api/session/config/api.rb
eco-helpers-1.3.19 lib/eco/api/session/config/api.rb
eco-helpers-1.4.1 lib/eco/api/session/config/api.rb
eco-helpers-1.4.0 lib/eco/api/session/config/api.rb
eco-helpers-1.3.18 lib/eco/api/session/config/api.rb
eco-helpers-1.3.17 lib/eco/api/session/config/api.rb
eco-helpers-1.3.16 lib/eco/api/session/config/api.rb
eco-helpers-1.3.15 lib/eco/api/session/config/api.rb
eco-helpers-1.3.14 lib/eco/api/session/config/api.rb
eco-helpers-1.3.13 lib/eco/api/session/config/api.rb
eco-helpers-1.3.12 lib/eco/api/session/config/api.rb
eco-helpers-1.3.11 lib/eco/api/session/config/api.rb
eco-helpers-1.3.10 lib/eco/api/session/config/api.rb
eco-helpers-1.3.9 lib/eco/api/session/config/api.rb
eco-helpers-1.3.8 lib/eco/api/session/config/api.rb
eco-helpers-1.3.7 lib/eco/api/session/config/api.rb
eco-helpers-1.3.6 lib/eco/api/session/config/api.rb
eco-helpers-1.3.5 lib/eco/api/session/config/api.rb
eco-helpers-1.3.4 lib/eco/api/session/config/api.rb