Class: FxTwitter

Inherits:
Object
  • Object
show all
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

Class Method Details

.mainObject

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'
   = nil
  password = nil
  opts = OptionParser.new
  opts.on("-u", "--user USERNAME", "Twitter account name", String) { |val|  = 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  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, , password)
  application.create()
  application.run()
end