Sha256: 6bbe38ee6e8a4bb5540acf12edb869f6d359a5e6c92d713bae6bfcefa6f17cab
Contents?: true
Size: 509 Bytes
Versions: 2
Compression:
Stored size: 509 Bytes
Contents
module Thanos module Item class Story attr_reader :id, :name, :resource_uri, :type def initialize(data) @id = data['id'].to_i @name = data['name'] @resource_uri = data['resourceURI'] @type = data['type'] || nil end def complete response = Thanos::API::Response.new(RestClient.get(@resource_uri)) results = Thanos::ResponseHolder.new(response).results Thanos::Factory::Story.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/story.rb |
thanos-0.5.0 | lib/thanos/resources/item/story.rb |