Sha256: 589f69615637d9bb230447df204990c2d211ab32681b24d7f654a169704ef43e
Contents?: true
Size: 587 Bytes
Versions: 2
Compression:
Stored size: 587 Bytes
Contents
command :write do |c| c.syntax = 'brief write PUBLISHER [options]' c.option '--file FILE', 'Specify a file to read from. Otherwise we use $EDITOR' c.action do |args, options| path = case when options.file Pathname(options.file) when (Pathname(args.last).exist? rescue false) Pathname(args.pop) end publisher = Brief::Publisher.find(args) content = ask_editor(publisher.sample) if content == publisher.sample say "Ignoring editor input, same as sample" end binding.pry end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
brief-0.0.3 | lib/brief/cli/commands/write.rb |
brief-0.0.2 | lib/brief/cli/commands/write.rb |