Class: OsCtld::Repository::Image
- Inherits:
-
Object
- Object
- OsCtld::Repository::Image
- Defined in:
- lib/osctld/repository/image.rb
Constant Summary collapse
- ATTRS =
%i[vendor variant arch distribution version tags].freeze
Instance Attribute Summary collapse
-
#arch ⇒ Object
readonly
Returns the value of attribute arch.
-
#distribution ⇒ Object
readonly
Returns the value of attribute distribution.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
-
#variant ⇒ Object
readonly
Returns the value of attribute variant.
-
#vendor ⇒ Object
readonly
Returns the value of attribute vendor.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
- #cached? ⇒ Boolean
- #dump ⇒ Object
-
#initialize(attrs) ⇒ Image
constructor
A new instance of Image.
Constructor Details
Instance Attribute Details
#arch ⇒ Object (readonly)
Returns the value of attribute arch.
4 5 6 |
# File 'lib/osctld/repository/image.rb', line 4 def arch @arch end |
#distribution ⇒ Object (readonly)
Returns the value of attribute distribution.
4 5 6 |
# File 'lib/osctld/repository/image.rb', line 4 def distribution @distribution end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
4 5 6 |
# File 'lib/osctld/repository/image.rb', line 4 def @tags end |
#variant ⇒ Object (readonly)
Returns the value of attribute variant.
4 5 6 |
# File 'lib/osctld/repository/image.rb', line 4 def variant @variant end |
#vendor ⇒ Object (readonly)
Returns the value of attribute vendor.
4 5 6 |
# File 'lib/osctld/repository/image.rb', line 4 def vendor @vendor end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
4 5 6 |
# File 'lib/osctld/repository/image.rb', line 4 def version @version end |
Instance Method Details
#cached? ⇒ Boolean
15 16 17 |
# File 'lib/osctld/repository/image.rb', line 15 def cached? @cached end |
#dump ⇒ Object
19 20 21 22 23 24 |
# File 'lib/osctld/repository/image.rb', line 19 def dump ret = {} ATTRS.each { |attr| ret[attr] = send(attr) } ret[:cached] = cached? ret end |