Class: Logchange::InteractiveLogger

Inherits:
Object
  • Object
show all
Defined in:
lib/logchange/interactive_logger.rb

Overview

Accept change information from the user via command line prompts.

Instance Method Summary collapse

Constructor Details

#initializeInteractiveLogger

Returns a new instance of InteractiveLogger.



6
7
8
9
# File 'lib/logchange/interactive_logger.rb', line 6

def initialize
  @title = nil
  @template = {}
end

Instance Method Details

#executeObject



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/logchange/interactive_logger.rb', line 11

def execute
  input_title

  template = Logchange::Template.load

  template.each do |key, value|
    input(key, value)
  end

  Logchange::Logger.new(@title, template: @template).execute
end