class ToDo::Context
Context
object that provides general info for all objects in the to-do app.
Constants
- DIR_PATH
Attributes
options[R]
Public Class Methods
new(options)
click to toggle source
# File lib/context.rb, line 12 def initialize(options) @options = options end
Public Instance Methods
dir_path()
click to toggle source
# File lib/context.rb, line 16 def dir_path File.join(Dir.home, DIR_PATH) end
editor()
click to toggle source
# File lib/context.rb, line 20 def editor options.editor || '$EDITOR' end
file_name()
click to toggle source
# File lib/context.rb, line 24 def file_name "#{options.date}.md" end
file_path()
click to toggle source
# File lib/context.rb, line 28 def file_path File.join(dir_path, file_name) end