Class: Twat::Twat
- Inherits:
-
Object
- Object
- Twat::Twat
- Includes:
- HandledExceptions
- Defined in:
- lib/twat.rb,
lib/twat/config.rb
Instance Method Summary collapse
Methods included from HandledExceptions
Instance Method Details
#cli_run ⇒ Object
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/twat.rb', line 59 def cli_run # FIXME Handing in the opts like this feels dirty with_handled_exceptions(ArgParse.new) do |opts| if opts[:account] && opts[:action] != :add config.account = opts[:account] end require 'readline-ng' actor = Actions.new actor.config = config actor.opts = opts actor.send(opts.[:action]) end end |
#config ⇒ Object
10 11 12 |
# File 'lib/twat/config.rb', line 10 def config @config ||= Config.new end |
#configure {|config| ... } ⇒ Object
3 4 5 6 7 8 |
# File 'lib/twat/config.rb', line 3 def configure(&block) yield config # If I understand correctly, I can check over what's # happened here? end |