Sha256: 16ef4e594e9dc28039dcd65e41eb2120187e2c8c026fbb01d8c6e36be49e0c76

Contents?: true

Size: 1.02 KB

Versions: 2

Compression:

Stored size: 1.02 KB

Contents

module Idonethis::Adapters
  module Views
    module Cli
      module List
        class << self
          def apply(dones=[])
            dones.select{|it| it["is_goal"] == false}.each_with_index do |d,i|
              #{
              # "id"=>22609300, "created"=>"2015-09-09T06:26:07.120", "updated"=>"2015-09-19T13:00:03.570", "markedup_text"=>"fix api smoke", "done_date"=>"2015-09-20", "owner"=>"ben.biddington",
              # "team_short_name"=>"benbiddington-personal", "tags"=>[], "likes"=>[], "comments"=>[], "meta_data"=>{}, "is_goal"=>true, "goal_completed"=>false,
              # "url"=>"https://idonethis.com/api/v0.1/dones/22609300/", "team"=>"https://idonethis.com/api/v0.1/teams/benbiddington-personal/", "raw_text"=>"[ ] fix api smoke", "permalink"=>"https://idonethis.com/done/22609300/"}
              # puts d.inspect
              printf("%-5s", i+1); puts %Q{#{d["created"]} #{d["team_short_name"]} -- #{d["raw_text"].slice(0,150)}}
            end
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
idonethis-cli-0.10.0 lib/adapters/views/cli.rb
idonethis-cli-0.9.0 lib/adapters/views/cli.rb