Class: Rafflesia::ReleaseCard

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/foundry/release_card.rb

Constant Summary collapse

HASH_ATTRS =
{
  input_types: :input_types,
  license: :license,
  metadata: :metadata,
  output_types: :output_types,
  publisher: :publisher,
  summary: :summary,
  tags: :tags,
  title: :title
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ ReleaseCard

Returns a new instance of ReleaseCard.



29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/rafflesia/foundry/release_card.rb', line 29

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @input_types = (hash[:input_types] || [])
  @license = hash[:license]
  @metadata = hash[:metadata] || {}
  @output_types = (hash[:output_types] || [])
  @publisher = hash[:publisher]
  @summary = hash[:summary]
  @tags = (hash[:tags] || [])
  @title = hash[:title]
end

Instance Attribute Details

#input_typesObject

Returns the value of attribute input_types.



19
20
21
# File 'lib/rafflesia/foundry/release_card.rb', line 19

def input_types
  @input_types
end

#licenseObject

Returns the value of attribute license.



19
20
21
# File 'lib/rafflesia/foundry/release_card.rb', line 19

def license
  @license
end

#metadataObject

Returns the value of attribute metadata.



19
20
21
# File 'lib/rafflesia/foundry/release_card.rb', line 19

def 
  @metadata
end

#output_typesObject

Returns the value of attribute output_types.



19
20
21
# File 'lib/rafflesia/foundry/release_card.rb', line 19

def output_types
  @output_types
end

#publisherObject

Returns the value of attribute publisher.



19
20
21
# File 'lib/rafflesia/foundry/release_card.rb', line 19

def publisher
  @publisher
end

#summaryObject

Returns the value of attribute summary.



19
20
21
# File 'lib/rafflesia/foundry/release_card.rb', line 19

def summary
  @summary
end

#tagsObject

Returns the value of attribute tags.



19
20
21
# File 'lib/rafflesia/foundry/release_card.rb', line 19

def tags
  @tags
end

#titleObject

Returns the value of attribute title.



19
20
21
# File 'lib/rafflesia/foundry/release_card.rb', line 19

def title
  @title
end