Class: FxTwitter
- Inherits:
-
Object
- Object
- FxTwitter
- Defined in:
- lib/fxtwitter.rb
Defined Under Namespace
Classes: TwitterWindow
Constant Summary collapse
- VERSION =
'0.1.0'- TWEET_LENGTH =
Twitter allows this many characters at most.
140
Class Method Summary collapse
-
.main ⇒ Object
Runs the fxtwitter application.
Class Method Details
.main ⇒ Object
Runs the fxtwitter application.
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
# File 'lib/fxtwitter.rb', line 166 def FxTwitter.main() require 'optparse' login = nil password = nil opts = OptionParser.new opts.on("-u", "--user USERNAME", "Twitter account name", String) { |val| login = val } opts.on("-p", "--password PASSWORD", "Twitter account password", String) { |val| password = val } opts.on("-h", "--help", "Show usage") { |val| puts opts.to_s; exit } opts.parse(ARGV) unless login and password puts "Username and password required in this version of fxtwitter" print opts.to_s exit end application = FXApp.new main_window = TwitterWindow.new(application, login, password) application.create() application.run() end |