Class: Omnibus::ManifestEntry
- Inherits:
-
Object
- Object
- Omnibus::ManifestEntry
- Defined in:
- lib/omnibus/manifest_entry.rb
Instance Attribute Summary collapse
-
#described_version ⇒ Object
readonly
Returns the value of attribute described_version.
-
#license ⇒ Object
readonly
Returns the value of attribute license.
-
#locked_source ⇒ Object
readonly
Returns the value of attribute locked_source.
-
#locked_version ⇒ Object
readonly
Returns the value of attribute locked_version.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#source_type ⇒ Object
readonly
Returns the value of attribute source_type.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(name, manifest_data) ⇒ ManifestEntry
constructor
A new instance of ManifestEntry.
- #to_hash ⇒ Object
Constructor Details
#initialize(name, manifest_data) ⇒ ManifestEntry
Returns a new instance of ManifestEntry.
20 21 22 23 24 25 26 27 |
# File 'lib/omnibus/manifest_entry.rb', line 20 def initialize(name, manifest_data) @name = name @locked_version = manifest_data[:locked_version] @locked_source = manifest_data[:locked_source] @source_type = manifest_data[:source_type] @described_version = manifest_data[:described_version] @license = manifest_data[:license] end |
Instance Attribute Details
#described_version ⇒ Object (readonly)
Returns the value of attribute described_version.
19 20 21 |
# File 'lib/omnibus/manifest_entry.rb', line 19 def described_version @described_version end |
#license ⇒ Object (readonly)
Returns the value of attribute license.
19 20 21 |
# File 'lib/omnibus/manifest_entry.rb', line 19 def license @license end |
#locked_source ⇒ Object (readonly)
Returns the value of attribute locked_source.
19 20 21 |
# File 'lib/omnibus/manifest_entry.rb', line 19 def locked_source @locked_source end |
#locked_version ⇒ Object (readonly)
Returns the value of attribute locked_version.
19 20 21 |
# File 'lib/omnibus/manifest_entry.rb', line 19 def locked_version @locked_version end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
19 20 21 |
# File 'lib/omnibus/manifest_entry.rb', line 19 def name @name end |
#source_type ⇒ Object (readonly)
Returns the value of attribute source_type.
19 20 21 |
# File 'lib/omnibus/manifest_entry.rb', line 19 def source_type @source_type end |
Instance Method Details
#==(other) ⇒ Object
39 40 41 42 43 |
# File 'lib/omnibus/manifest_entry.rb', line 39 def ==(other) if other.is_a?(ManifestEntry) (to_hash == other.to_hash) && (name == other.name) end end |
#to_hash ⇒ Object
29 30 31 32 33 34 35 36 37 |
# File 'lib/omnibus/manifest_entry.rb', line 29 def to_hash { locked_version: @locked_version, locked_source: @locked_source, source_type: @source_type, described_version: @described_version, license: @license, } end |