Class: Plog::Cli
- Inherits:
-
Object
- Object
- Plog::Cli
- Defined in:
- lib/cli.rb
Constant Summary collapse
- STATS_FILE =
'statistics.txt'
Instance Attribute Summary collapse
-
#log_files ⇒ Object
readonly
Returns the value of attribute log_files.
-
#source_directory ⇒ Object
readonly
Returns the value of attribute source_directory.
Instance Method Summary collapse
-
#initialize(source_directory, target_directory) ⇒ Cli
constructor
CLIENT INTERFACE ==========================================================================.
- #run! ⇒ Object
Constructor Details
#initialize(source_directory, target_directory) ⇒ Cli
CLIENT INTERFACE
13 14 15 16 17 18 19 |
# File 'lib/cli.rb', line 13 def initialize(source_directory, target_directory) @log_files = [] @source_directory = source_directory @target_directory = target_directory check_directory_consistency! preload_log_files! end |
Instance Attribute Details
#log_files ⇒ Object (readonly)
Returns the value of attribute log_files.
5 6 7 |
# File 'lib/cli.rb', line 5 def log_files @log_files end |
#source_directory ⇒ Object (readonly)
Returns the value of attribute source_directory.
5 6 7 |
# File 'lib/cli.rb', line 5 def source_directory @source_directory end |
Instance Method Details
#run! ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/cli.rb', line 21 def run! stdout (@log_files.size) stdout create_object_files destroy_old_log_file append_headers_to_log_file parse_object_files end |