Class: Skywatch::Check

Inherits:
Script
  • Object
show all
Defined in:
lib/skywatch/tool.rb

Instance Attribute Summary collapse

Attributes inherited from Script

#name, #path

Instance Method Summary collapse

Methods inherited from Script

[], #destroy, #disable, #enable, #enabled?

Constructor Details

#initialize(path) ⇒ Check

Returns a new instance of Check.



199
200
201
202
203
204
# File 'lib/skywatch/tool.rb', line 199

def initialize(path)
  interval, name = File.basename(path).split('.', 2)
  @path = path
  @name = name
  @interval = interval.to_i
end

Instance Attribute Details

#intervalObject (readonly)

Returns the value of attribute interval.



197
198
199
# File 'lib/skywatch/tool.rb', line 197

def interval
  @interval
end