Commits

Richo Healey  committed 3ee8a2d

Yarr, press -l on the wheel to steer yer ship toward other pirate's
tweets!

  • Participants
  • Parent commits b3af5de

Comments (0)

Files changed (2)

File lib/twat/actions.rb

       end
     end
 
+    def show(opts)
+      puts "#{opts[:count]} Tweets XD"
+    end
+
     def version(opts)
       puts "twat: #{VERSION_MAJOR}.#{VERSION_MINOR}.#{VERSION_PATCH}"
     end

File lib/twat/argparse.rb

           puts opts
           exit
         end
+        opts.on('-l', '--list [COUNT]', 'Display [count] tweets from your newsfeed') do |count|
+          options[:count] = count || 10
+          options[:action] = :show
+        end
         opts.on('-v', '--version', 'Display version info') do
           options[:action] = :version
         end