Class: EvernoteLinkExtractor::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/evernote_link_extractor/runner.rb

Overview

This is the main class and is doing the whole job … atm

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRunner

initializer with setting up some instance variables



12
13
14
15
16
17
# File 'lib/evernote_link_extractor/runner.rb', line 12

def initialize
  @file_list = []
  @link_list = []
  @fl = FileList.new
  @ll = LinkList.new
end

Instance Attribute Details

#file_listObject (readonly)

Returns the value of attribute file_list.



9
10
11
# File 'lib/evernote_link_extractor/runner.rb', line 9

def file_list
  @file_list
end

Returns the value of attribute link_list.



9
10
11
# File 'lib/evernote_link_extractor/runner.rb', line 9

def link_list
  @link_list
end

Instance Method Details

#runObject

this is the only public method to be called



20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/evernote_link_extractor/runner.rb', line 20

def run
  Helper.question('Do you want to create a CSV file now (yes|no)?: ')
  action = gets.chomp

  case action
  when 'no'
    Helper.close
  when 'yes'
    execute
  else
    Helper.warning('please type yes or no: ')
    run
  end
end