Module: Templates

Defined in:
lib/my_todo/modules/templates.rb

Instance Method Summary collapse

Instance Method Details



14
15
16
# File 'lib/my_todo/modules/templates.rb', line 14

def print_item
  say ERB.new(File.read("#{__dir__}/../templates/item.erb"), nil, '-').result(binding)
end


2
3
4
# File 'lib/my_todo/modules/templates.rb', line 2

def print_list
  say ERB.new(File.read("#{__dir__}/../templates/list.erb"), nil, '-').result(binding)
end


6
7
8
# File 'lib/my_todo/modules/templates.rb', line 6

def print_notes
  say ERB.new(File.read("#{__dir__}/../templates/notes.erb"), nil, '-').result(binding)
end


10
11
12
# File 'lib/my_todo/modules/templates.rb', line 10

def print_search_results
  say ERB.new(File.read("#{__dir__}/../templates/results.erb"), nil, '-').result(binding)
end