Class: Wooget::Package
- Inherits:
-
Object
- Object
- Wooget::Package
- Defined in:
- lib/wooget/nuget.rb
Instance Attribute Summary collapse
-
#authors ⇒ Object
readonly
Returns the value of attribute authors.
-
#copyright ⇒ Object
readonly
Returns the value of attribute copyright.
-
#created ⇒ Object
readonly
Returns the value of attribute created.
-
#dependencies ⇒ Object
readonly
Returns the value of attribute dependencies.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#download_count ⇒ Object
readonly
Returns the value of attribute download_count.
-
#gallery_details_url ⇒ Object
readonly
Returns the value of attribute gallery_details_url.
-
#has_binary ⇒ Object
Returns the value of attribute has_binary.
-
#icon_url ⇒ Object
readonly
Returns the value of attribute icon_url.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#is_absolute_latest_version ⇒ Object
readonly
Returns the value of attribute is_absolute_latest_version.
-
#is_binary ⇒ Object
Returns the value of attribute is_binary.
-
#is_latest_version ⇒ Object
readonly
Returns the value of attribute is_latest_version.
-
#is_prerelease ⇒ Object
readonly
Returns the value of attribute is_prerelease.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#last_updated ⇒ Object
readonly
Returns the value of attribute last_updated.
-
#license_url ⇒ Object
readonly
Returns the value of attribute license_url.
-
#normalized_version ⇒ Object
readonly
Returns the value of attribute normalized_version.
-
#package_hash ⇒ Object
readonly
Returns the value of attribute package_hash.
-
#package_hash_algorithm ⇒ Object
readonly
Returns the value of attribute package_hash_algorithm.
-
#package_id ⇒ Object
readonly
Returns the value of attribute package_id.
-
#package_size ⇒ Object
readonly
Returns the value of attribute package_size.
-
#project_url ⇒ Object
readonly
Returns the value of attribute project_url.
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
-
#published ⇒ Object
readonly
Returns the value of attribute published.
-
#release_notes ⇒ Object
readonly
Returns the value of attribute release_notes.
-
#report_abuse_url ⇒ Object
readonly
Returns the value of attribute report_abuse_url.
-
#require_license_acceptance ⇒ Object
readonly
Returns the value of attribute require_license_acceptance.
-
#summary ⇒ Object
readonly
Returns the value of attribute summary.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Class Method Summary collapse
-
.process_binary_packages(packages) ⇒ Object
discern between source and binary packages.
Instance Method Summary collapse
-
#initialize(package_id, url, properties) ⇒ Package
constructor
A new instance of Package.
Constructor Details
#initialize(package_id, url, properties) ⇒ Package
Returns a new instance of Package.
61 62 63 64 65 66 67 |
# File 'lib/wooget/nuget.rb', line 61 def initialize package_id, url, properties @package_id = package_id @url = url @properties = properties || {} apply_properties end |
Instance Attribute Details
#authors ⇒ Object (readonly)
Returns the value of attribute authors.
54 55 56 |
# File 'lib/wooget/nuget.rb', line 54 def @authors end |
#copyright ⇒ Object (readonly)
Returns the value of attribute copyright.
54 55 56 |
# File 'lib/wooget/nuget.rb', line 54 def copyright @copyright end |
#created ⇒ Object (readonly)
Returns the value of attribute created.
54 55 56 |
# File 'lib/wooget/nuget.rb', line 54 def created @created end |
#dependencies ⇒ Object (readonly)
Returns the value of attribute dependencies.
54 55 56 |
# File 'lib/wooget/nuget.rb', line 54 def dependencies @dependencies end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
54 55 56 |
# File 'lib/wooget/nuget.rb', line 54 def description @description end |
#download_count ⇒ Object (readonly)
Returns the value of attribute download_count.
54 55 56 |
# File 'lib/wooget/nuget.rb', line 54 def download_count @download_count end |
#gallery_details_url ⇒ Object (readonly)
Returns the value of attribute gallery_details_url.
55 56 57 |
# File 'lib/wooget/nuget.rb', line 55 def gallery_details_url @gallery_details_url end |
#has_binary ⇒ Object
Returns the value of attribute has_binary.
59 60 61 |
# File 'lib/wooget/nuget.rb', line 59 def has_binary @has_binary end |
#icon_url ⇒ Object (readonly)
Returns the value of attribute icon_url.
55 56 57 |
# File 'lib/wooget/nuget.rb', line 55 def icon_url @icon_url end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
54 55 56 |
# File 'lib/wooget/nuget.rb', line 54 def id @id end |
#is_absolute_latest_version ⇒ Object (readonly)
Returns the value of attribute is_absolute_latest_version.
55 56 57 |
# File 'lib/wooget/nuget.rb', line 55 def is_absolute_latest_version @is_absolute_latest_version end |
#is_binary ⇒ Object
Returns the value of attribute is_binary.
59 60 61 |
# File 'lib/wooget/nuget.rb', line 59 def is_binary @is_binary end |
#is_latest_version ⇒ Object (readonly)
Returns the value of attribute is_latest_version.
55 56 57 |
# File 'lib/wooget/nuget.rb', line 55 def is_latest_version @is_latest_version end |
#is_prerelease ⇒ Object (readonly)
Returns the value of attribute is_prerelease.
55 56 57 |
# File 'lib/wooget/nuget.rb', line 55 def is_prerelease @is_prerelease end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
55 56 57 |
# File 'lib/wooget/nuget.rb', line 55 def language @language end |
#last_updated ⇒ Object (readonly)
Returns the value of attribute last_updated.
55 56 57 |
# File 'lib/wooget/nuget.rb', line 55 def last_updated @last_updated end |
#license_url ⇒ Object (readonly)
Returns the value of attribute license_url.
57 58 59 |
# File 'lib/wooget/nuget.rb', line 57 def license_url @license_url end |
#normalized_version ⇒ Object (readonly)
Returns the value of attribute normalized_version.
54 55 56 |
# File 'lib/wooget/nuget.rb', line 54 def normalized_version @normalized_version end |
#package_hash ⇒ Object (readonly)
Returns the value of attribute package_hash.
56 57 58 |
# File 'lib/wooget/nuget.rb', line 56 def package_hash @package_hash end |
#package_hash_algorithm ⇒ Object (readonly)
Returns the value of attribute package_hash_algorithm.
56 57 58 |
# File 'lib/wooget/nuget.rb', line 56 def package_hash_algorithm @package_hash_algorithm end |
#package_id ⇒ Object (readonly)
Returns the value of attribute package_id.
52 53 54 |
# File 'lib/wooget/nuget.rb', line 52 def package_id @package_id end |
#package_size ⇒ Object (readonly)
Returns the value of attribute package_size.
56 57 58 |
# File 'lib/wooget/nuget.rb', line 56 def package_size @package_size end |
#project_url ⇒ Object (readonly)
Returns the value of attribute project_url.
56 57 58 |
# File 'lib/wooget/nuget.rb', line 56 def project_url @project_url end |
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
52 53 54 |
# File 'lib/wooget/nuget.rb', line 52 def properties @properties end |
#published ⇒ Object (readonly)
Returns the value of attribute published.
56 57 58 |
# File 'lib/wooget/nuget.rb', line 56 def published @published end |
#release_notes ⇒ Object (readonly)
Returns the value of attribute release_notes.
56 57 58 |
# File 'lib/wooget/nuget.rb', line 56 def release_notes @release_notes end |
#report_abuse_url ⇒ Object (readonly)
Returns the value of attribute report_abuse_url.
56 57 58 |
# File 'lib/wooget/nuget.rb', line 56 def report_abuse_url @report_abuse_url end |
#require_license_acceptance ⇒ Object (readonly)
Returns the value of attribute require_license_acceptance.
57 58 59 |
# File 'lib/wooget/nuget.rb', line 57 def require_license_acceptance @require_license_acceptance end |
#summary ⇒ Object (readonly)
Returns the value of attribute summary.
57 58 59 |
# File 'lib/wooget/nuget.rb', line 57 def summary @summary end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
57 58 59 |
# File 'lib/wooget/nuget.rb', line 57 def @tags end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
52 53 54 |
# File 'lib/wooget/nuget.rb', line 52 def url @url end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
54 55 56 |
# File 'lib/wooget/nuget.rb', line 54 def version @version end |
Class Method Details
.process_binary_packages(packages) ⇒ Object
discern between source and binary packages
71 72 73 74 75 76 77 78 79 |
# File 'lib/wooget/nuget.rb', line 71 def self.process_binary_packages(packages) packages.each do |package| package.is_binary = (package.package_id =~ /Binary/ or packages.any? { |p| p.package_id == package.package_id + ".Source" }) package.has_binary = packages.any? do |p| (p.package_id != package.package_id and p.package_id == package.package_id.chomp(".Source"))\ or p.package_id == package.package_id + ".Binary" end end end |