Sha256: 8af8e2bebd5dceb064a66736ae3608f7c1fa161fd102d3a7a03777feb6930fd8

Contents?: true

Size: 471 Bytes

Versions: 2

Compression:

Stored size: 471 Bytes

Contents

module Thanos
  module Item
    class Creator
      attr_reader :name, :resource_uri, :role

      def initialize(data)
        @name = data['name']
        @resource_uri = data['resourceURI']
        @role = data['role']
      end

      def complete
        response = Thanos::API::Response.new(RestClient.get(@resource_uri))
        results = Thanos::ResponseHolder.new(response).results
        Thanos::Factory::Creator.new(results).build
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
thanos-0.6.0 lib/thanos/resources/item/creator.rb
thanos-0.5.0 lib/thanos/resources/item/creator.rb