module StandupMD::Cli::Helpers
Helpers for CLI commands and option handling.
Public Instance Methods
Source
# File lib/standup_md/cli/helpers.rb, line 29 def post(entry) return puts "No record found for #{config.cli.date}" if entry.nil? result = StandupMD::Post.post( entry, adapter: config.cli.post_adapter, channel: config.cli.post_channel, config: config ) puts "Could not post to #{result.adapter}: #{result.error}" if result.failure? result end
Post an entry to the configured chat adapter.
@param [StandupMD::Entry] entry
@return [StandupMD::Post::Result, nil]
Source
# File lib/standup_md/cli/helpers.rb, line 17 def print(entry) return puts "No record found for #{config.cli.date}" if entry.nil? $stdout.print markdown.render_entry(entry) end
Print an entry to the command line.
@param [StandupMD::Entry] entry
@return [nil]