Method: Pbl::CLI#run
- Defined in:
- lib/pbl/cli.rb
#run ⇒ Object
51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/pbl/cli.rb', line 51 def run page unless $test_env if @argv.empty? @pinboard.posts(:results => 150).each do |post| puts "[%s] %s %s" % [post[:time].strftime("%Y/%m/%d").cyan, post[:description].cut, post[0].green] end else @pinboard.posts(:tag => @argv.join(',')).each do |post| puts "[%s] %s %s" % [post[:time].strftime("%Y/%m/%d").cyan, post[:description].cut, post[0].green] end end end |