class Daygram::CLI
The Command Line Interface (CLI
) for the gem.
Public Class Methods
configuration()
click to toggle source
# File lib/daygram/cli.rb, line 61 def self.configuration Runcom::Configuration.new file_name: Daygram::Identity.file_name end
new(args = [], options = {})
click to toggle source
Calls superclass method
# File lib/daygram/cli.rb, line 65 def initialize args = [], options = {}, config = {} super args, options, config end
Public Instance Methods
config()
click to toggle source
# File lib/daygram/cli.rb, line 82 def config path = self.class.configuration.computed_path unless File.exists? path FileUtils.touch(path) end if options.edit? then `#{editor} #{path}` elsif options.info? then say(path) else help(:config) end end
help(task = nil)
click to toggle source
Calls superclass method
# File lib/daygram/cli.rb, line 103 def help task = nil say and super end
version()
click to toggle source
# File lib/daygram/cli.rb, line 97 def version say Identity.version_label end