Class: Rafflesia::RepositorySummary
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::RepositorySummary
- Defined in:
- lib/rafflesia/registry/repository_summary.rb
Constant Summary collapse
- HASH_ATTRS =
{ aliases: :aliases, build_count: :build_count, capabilities: :capabilities, description: :description, display_name: :display_name, latest_release: :latest_release, license: :license, release_count: :release_count, repository: :repository, scope: :scope, source_url: :source_url, visibility: :visibility }.freeze
Instance Attribute Summary collapse
-
#aliases ⇒ Object
Returns the value of attribute aliases.
-
#build_count ⇒ Object
Returns the value of attribute build_count.
-
#capabilities ⇒ Object
Returns the value of attribute capabilities.
-
#description ⇒ Object
Returns the value of attribute description.
-
#display_name ⇒ Object
Returns the value of attribute display_name.
-
#latest_release ⇒ Object
Returns the value of attribute latest_release.
-
#license ⇒ Object
Returns the value of attribute license.
-
#release_count ⇒ Object
Returns the value of attribute release_count.
-
#repository ⇒ Object
Returns the value of attribute repository.
-
#scope ⇒ Object
Returns the value of attribute scope.
-
#source_url ⇒ Object
Returns the value of attribute source_url.
-
#visibility ⇒ Object
Returns the value of attribute visibility.
Instance Method Summary collapse
-
#initialize(json) ⇒ RepositorySummary
constructor
A new instance of RepositorySummary.
Constructor Details
#initialize(json) ⇒ RepositorySummary
Returns a new instance of RepositorySummary.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/rafflesia/registry/repository_summary.rb', line 37 def initialize(json) super() hash = self.class.normalize(json) @aliases = (hash[:aliases] || []).map { |item| item ? Rafflesia::ReleaseAlias.new(item) : nil } @build_count = hash[:build_count] @capabilities = (hash[:capabilities] || []) @description = hash[:description] @display_name = hash[:display_name] @latest_release = hash[:latest_release] ? Rafflesia::ReleaseRef.new(hash[:latest_release]) : nil @license = hash[:license] @release_count = hash[:release_count] @repository = hash[:repository] ? Rafflesia::RepositoryRef.new(hash[:repository]) : nil @scope = hash[:scope] ? Rafflesia::RegistryScope.new(hash[:scope]) : nil @source_url = hash[:source_url] @visibility = hash[:visibility] end |
Instance Attribute Details
#aliases ⇒ Object
Returns the value of attribute aliases.
23 24 25 |
# File 'lib/rafflesia/registry/repository_summary.rb', line 23 def aliases @aliases end |
#build_count ⇒ Object
Returns the value of attribute build_count.
23 24 25 |
# File 'lib/rafflesia/registry/repository_summary.rb', line 23 def build_count @build_count end |
#capabilities ⇒ Object
Returns the value of attribute capabilities.
23 24 25 |
# File 'lib/rafflesia/registry/repository_summary.rb', line 23 def capabilities @capabilities end |
#description ⇒ Object
Returns the value of attribute description.
23 24 25 |
# File 'lib/rafflesia/registry/repository_summary.rb', line 23 def description @description end |
#display_name ⇒ Object
Returns the value of attribute display_name.
23 24 25 |
# File 'lib/rafflesia/registry/repository_summary.rb', line 23 def display_name @display_name end |
#latest_release ⇒ Object
Returns the value of attribute latest_release.
23 24 25 |
# File 'lib/rafflesia/registry/repository_summary.rb', line 23 def latest_release @latest_release end |
#license ⇒ Object
Returns the value of attribute license.
23 24 25 |
# File 'lib/rafflesia/registry/repository_summary.rb', line 23 def license @license end |
#release_count ⇒ Object
Returns the value of attribute release_count.
23 24 25 |
# File 'lib/rafflesia/registry/repository_summary.rb', line 23 def release_count @release_count end |
#repository ⇒ Object
Returns the value of attribute repository.
23 24 25 |
# File 'lib/rafflesia/registry/repository_summary.rb', line 23 def repository @repository end |
#scope ⇒ Object
Returns the value of attribute scope.
23 24 25 |
# File 'lib/rafflesia/registry/repository_summary.rb', line 23 def scope @scope end |
#source_url ⇒ Object
Returns the value of attribute source_url.
23 24 25 |
# File 'lib/rafflesia/registry/repository_summary.rb', line 23 def source_url @source_url end |
#visibility ⇒ Object
Returns the value of attribute visibility.
23 24 25 |
# File 'lib/rafflesia/registry/repository_summary.rb', line 23 def visibility @visibility end |