Class: Riemann::Tools::PackageUpdates::Apt::Package
- Inherits:
-
Object
- Object
- Riemann::Tools::PackageUpdates::Apt::Package
- Defined in:
- lib/riemann/tools/package_updates/apt.rb
Instance Attribute Summary collapse
-
#current_version ⇒ Object
readonly
Returns the value of attribute current_version.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#new_version ⇒ Object
readonly
Returns the value of attribute new_version.
Instance Method Summary collapse
-
#initialize(s) ⇒ Package
constructor
A new instance of Package.
- #security? ⇒ Boolean
Constructor Details
#initialize(s) ⇒ Package
Returns a new instance of Package.
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/riemann/tools/package_updates/apt.rb', line 20 def initialize(s) if s =~ /^Inst ([^ ]+) \[([^ ]+)\] \(([^ ]+) ([^ ]+)/ @name = $1 @current_version = $2 @new_version = $3 @source = $4 else raise ArgumentError, "Invalid string: #{s.inspect}" end end |
Instance Attribute Details
#current_version ⇒ Object (readonly)
Returns the value of attribute current_version.
18 19 20 |
# File 'lib/riemann/tools/package_updates/apt.rb', line 18 def current_version @current_version end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
18 19 20 |
# File 'lib/riemann/tools/package_updates/apt.rb', line 18 def name @name end |
#new_version ⇒ Object (readonly)
Returns the value of attribute new_version.
18 19 20 |
# File 'lib/riemann/tools/package_updates/apt.rb', line 18 def new_version @new_version end |
Instance Method Details
#security? ⇒ Boolean
32 33 34 |
# File 'lib/riemann/tools/package_updates/apt.rb', line 32 def security? @source =~ /Security/ end |