Class: VpsbClient::Datafiles::SarManager

Inherits:
Object
  • Object
show all
Defined in:
lib/vpsb_client/datafiles/sar_manager.rb

Defined Under Namespace

Classes: NotFoundError, PermissionDeniedError, SadfError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(orig_path, target_path, sadf = Sadf) ⇒ SarManager

Returns a new instance of SarManager.

Raises:



10
11
12
13
14
15
# File 'lib/vpsb_client/datafiles/sar_manager.rb', line 10

def initialize(orig_path, target_path, sadf = Sadf)
  raise NotFoundError, "#{orig_path} is not a directory" unless File.directory?(orig_path)
  @orig_path = orig_path
  @target_path = target_path
  @sadf_runner = sadf
end

Instance Attribute Details

#sadf_runnerObject (readonly)

Returns the value of attribute sadf_runner.



8
9
10
# File 'lib/vpsb_client/datafiles/sar_manager.rb', line 8

def sadf_runner
  @sadf_runner
end

Instance Method Details

#runObject



17
18
19
20
21
# File 'lib/vpsb_client/datafiles/sar_manager.rb', line 17

def run
  create_target_path
  create_daily_formatted
  create_current_day_temp_formatted
end