Sha256: 660ae6704d1a44ce89c76c551a2b64a6550880e77168b0151ef102e40d591681

Contents?: true

Size: 466 Bytes

Versions: 11

Compression:

Stored size: 466 Bytes

Contents

module TryApi
  class Project < TryApi::Base
    typesafe_accessor :name, String
    typesafe_accessor :menu_items, Array, items_type: TryApi::MenuItem
    typesafe_accessor :host, String
    typesafe_accessor :port, Integer
    typesafe_accessor :api_prefix, String
    typesafe_accessor :variables, Hash, {}

    def to_json
      super.merge endpoint: endpoint
    end

    def endpoint
      "#{ host }#{ port.blank? ? '' : (':' + port.to_s) }"
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
try_api-0.1.10 app/models/try_api/project.rb
try_api-0.1.9 app/models/try_api/project.rb
try_api-0.1.8 app/models/try_api/project.rb
try_api-0.1.7 app/models/try_api/project.rb
try_api-0.1.6 app/models/try_api/project.rb
try_api-0.1.5 app/models/try_api/project.rb
try_api-0.1.4 app/models/try_api/project.rb
try_api-0.1.3 app/models/try_api/project.rb
try_api-0.1.2 app/models/try_api/project.rb
try_api-0.1.1 app/models/try_api/project.rb
try_api-0.1.0 app/models/try_api/project.rb