Class: OrgMode::DefaultOrgfile

Inherits:
Object
  • Object
show all
Extended by:
FileOperations
Defined in:
lib/org_mode/configuration.rb

Class Method Summary collapse

Methods included from FileOperations

spit_into_file

Class Method Details

.content(tmpl_vars = {}) ⇒ Object



20
21
22
23
24
25
26
27
# File 'lib/org_mode/configuration.rb', line 20

def content(tmpl_vars={})
  return <<-EOF.strip_indent(10)
   This is your default orgmode agenda file, the orgmode script
   finds this file since it's configured in #{tmpl_vars.fetch(:target_path)}

   * TODO Configure orgmoderc file in #{tmpl_vars.fetch(:target_path)} <#{DateTime.now.strftime('%Y-%m-%d %a')}>
 EOF
end

.write_to(path, tmpl_vars = {}) ⇒ Object



29
30
31
# File 'lib/org_mode/configuration.rb', line 29

def write_to(path, tmpl_vars={})
  spit_into_file(path, content(tmpl_vars))
end