Module: Ircnotify
- Defined in:
- lib/ircnotify.rb,
lib/ircnotify/main.rb,
lib/ircnotify/version.rb,
lib/ircnotify/notifier.rb,
lib/ircnotify/null_logger.rb
Defined Under Namespace
Classes: Notifier, NullLogger
Constant Summary collapse
- IRC_CONF =
{}
- VERSION =
"0.0.3"
Class Method Summary collapse
Class Method Details
.main ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/ircnotify/main.rb', line 3 def self.main = ::Trollop:: do <<-EOS ircnotifier #{::Ircnotify::VERSION} Usage: ircnotifier <opts> --message "your message" Options: EOS opt :config, "Config file", :type => :string, :default => File.("~/.ircnotify") opt :message, "Your message", :type => :string, :default => 'test' opt :verbose, "Be very verbose", :type => :bool, :default => false # TODO # opt :notice, "Use /notice <channel>", :default => false # opt :channels, "Comma-delimited list or irc channels", :type => :string, :default => 'test' end IRC_CONF.merge! ::YAML::load_file File. .delete(:config) notifier = Ircnotify::Notifier.new .delete(:message), .delete(:verbose) notifier.notify end |