Class: Battlestation::Operations::ExecutableCheck
- Defined in:
- lib/battlestation/operations/executable_check.rb
Instance Attribute Summary collapse
-
#filename ⇒ Object
Returns the value of attribute filename.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(filename, opts = {}) ⇒ ExecutableCheck
constructor
A new instance of ExecutableCheck.
- #status ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(filename, opts = {}) ⇒ ExecutableCheck
Returns a new instance of ExecutableCheck.
6 7 8 9 10 11 |
# File 'lib/battlestation/operations/executable_check.rb', line 6 def initialize(filename, opts = {}) @filename = filename @type = :executable @name = "executable-#{filename}" @opts = opts end |
Instance Attribute Details
#filename ⇒ Object
Returns the value of attribute filename.
4 5 6 |
# File 'lib/battlestation/operations/executable_check.rb', line 4 def filename @filename end |
Instance Method Details
#status ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/battlestation/operations/executable_check.rb', line 13 def status if executable_exists? { status: :okay, msg: "#{filename} executable found", name: name } else { status: :fail, msg: "#{filename} executable not found", resolution: opts[:resolution], name: name } end end |