Sha256: fd4810d5eef3442d1597e71bf52a9e9ac8ad4a05b5e10425feb8b73b9a1a84f0

Contents?: true

Size: 488 Bytes

Versions: 3

Compression:

Stored size: 488 Bytes

Contents

module Marver
  module Summary
    class Story
      attr_reader :id, :name, :resource_uri, :type

      def initialize(json)
        @name = json['name']
        @resource_uri = json['resourceURI']
        @type = json['type'] || nil
        @id = json['id'].to_i
      end

      def full
        response = Marver::API::Response.new(RestClient.get(@resource_uri))
        data = Marver::DataContainer.new(response).results
        Marver::Story.build(data)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
marver-0.0.6 lib/marver/entities/summary/story.rb
marver-0.0.5 lib/marver/entities/summary/story.rb
marver-0.0.4 lib/marver/entities/summary/story.rb