class Cue::Command::Add
Public Class Methods
new(args)
click to toggle source
Calls superclass method
# File lib/cue/command/add.rb, line 7 def initialize(args) super(args) if @args.size == 1 @content = @args.first else @content = Utils::Editor.new.read end end
Public Instance Methods
execute()
click to toggle source
# File lib/cue/command/add.rb, line 17 def execute item = Cue::Item.new(@content) item.save(options.store) end
nargs()
click to toggle source
# File lib/cue/command/add.rb, line 22 def nargs (0..1) end