Sha256: 28785e2895fe163a9da708d48dcd9d6bb4f5cc56cc7fc53ff5d7f0b0d6f139ce

Contents?: true

Size: 405 Bytes

Versions: 1

Compression:

Stored size: 405 Bytes

Contents

module OMCMS
  class Component < Resource
    def initialize(client, response = {}, host)
      @offering_id = response["id"]
      super
    end

    def all
      perform_run self, request_path
    end

    def get(id)
      perform_run self, request_path(id)
    end

    private

    def request_path(key = nil)
      ["offerings", @offering_id, "components", key].compact.join("/")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
omcms-ruby-client-1.2.0 lib/omcms/resource/component.rb