Class: Marver::Summary::Creator

Inherits:
Object
  • Object
show all
Defined in:
lib/marver/entities/summary/creator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ Creator

Returns a new instance of Creator.



8
9
10
11
12
# File 'lib/marver/entities/summary/creator.rb', line 8

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

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/marver/entities/summary/creator.rb', line 6

def name
  @name
end

#resource_uriObject (readonly)

Returns the value of attribute resource_uri.



6
7
8
# File 'lib/marver/entities/summary/creator.rb', line 6

def resource_uri
  @resource_uri
end

#roleObject (readonly)

Returns the value of attribute role.



6
7
8
# File 'lib/marver/entities/summary/creator.rb', line 6

def role
  @role
end

Instance Method Details

#fullObject



14
15
16
17
18
# File 'lib/marver/entities/summary/creator.rb', line 14

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