Module: Hasmenu::Printer

Included in:
Builder, Formatter, Reporter, SpellChecker, Validator
Defined in:
lib/hasmenu/printer.rb

Instance Method Summary collapse

Instance Method Details



47
48
49
# File 'lib/hasmenu/printer.rb', line 47

def print_build_for(restaurant)
  puts "  - #{restaurant}".colorize(:green)
end


43
44
45
# File 'lib/hasmenu/printer.rb', line 43

def print_build_start
  puts "building restaurant menus".colorize(:green)
end


23
24
25
# File 'lib/hasmenu/printer.rb', line 23

def print_format_for(file)
  puts "  - #{file}".colorize(:green)
end


19
20
21
# File 'lib/hasmenu/printer.rb', line 19

def print_format_start
  puts "formatting files".colorize(:green)
end


5
6
7
8
9
# File 'lib/hasmenu/printer.rb', line 5

def print_header(title)
  puts "--------------------------------------------------------------------------------".colorize(:green)
  puts title.colorize(:green)
  puts "--------------------------------------------------------------------------------".colorize(:green)
end


39
40
41
# File 'lib/hasmenu/printer.rb', line 39

def print_invalid_build
  puts "\n  error: please provide a valid build type\n".colorize(:red)
end


15
16
17
# File 'lib/hasmenu/printer.rb', line 15

def print_invalid_format
  puts "\n  error: please provide a valid format type\n".colorize(:red)
end


11
12
13
# File 'lib/hasmenu/printer.rb', line 11

def print_invalid_path
  puts "\n  error: please provide a valid file or directory\n".colorize(:red)
end


51
52
53
# File 'lib/hasmenu/printer.rb', line 51

def print_invalid_report
  puts "\n  error: please provide a valid report type\n".colorize(:red)
end


31
32
33
# File 'lib/hasmenu/printer.rb', line 31

def print_invalid_sequence
  puts "#: failed name #: filename sequence should be a number for active, and xa for inactive menu"
end


35
36
37
# File 'lib/hasmenu/printer.rb', line 35

def print_invalid_version
  puts "#: failed name #: filename should match with menu uid and version"
end


55
56
57
58
# File 'lib/hasmenu/printer.rb', line 55

def print_report(data)
  data.each { |d| puts "  - #{d}".colorize(:green) }
  print_header "Count: #{data.count}"
end


27
28
29
# File 'lib/hasmenu/printer.rb', line 27

def print_warn_repeats
  puts "warning: please review the use of repeat property".colorize(:yellow)
end