Sha256: ef605be323e18cc5ed56ed36ff76be400572f9cf2a3ba1bfe06c181bee28a854

Contents?: true

Size: 1.23 KB

Versions: 11

Compression:

Stored size: 1.23 KB

Contents

# frozen_string_literal: true

desc "Graph activities over time"
command :graph do |graph|
  graph.flag [:with],
             arg_name: "NAME",
             desc: "Graph activities with the given friend",
             type: Stripped,
             multiple: true

  graph.flag [:in],
             arg_name: "LOCATION",
             desc: "Graph activities in the given location",
             type: Stripped

  graph.flag [:tagged],
             arg_name: "@TAG",
             desc: "Graph activities with the given tag",
             type: Tag,
             multiple: true

  graph.flag [:since],
             arg_name: "DATE",
             desc: "Graph activities on or after the given date",
             type: InputDate

  graph.flag [:until],
             arg_name: "DATE",
             desc: "Graph activities before or on the given date",
             type: InputDate

  graph.switch [:unscaled],
               negatable: false,
               desc: "Do not scale the bars in the graph"

  graph.action do |_, options|
    @introvert.graph(
      with: options[:with],
      location_name: options[:in],
      tagged: options[:tagged],
      since_date: options[:since],
      until_date: options[:until],
      unscaled: options[:unscaled]
    )
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
friends-0.55 lib/friends/commands/graph.rb
friends-0.54 lib/friends/commands/graph.rb
friends-0.53 lib/friends/commands/graph.rb
friends-0.52 lib/friends/commands/graph.rb
friends-0.51 lib/friends/commands/graph.rb
friends-0.50 lib/friends/commands/graph.rb
friends-0.49 lib/friends/commands/graph.rb
friends-0.48 lib/friends/commands/graph.rb
friends-0.47 lib/friends/commands/graph.rb
friends-0.46 lib/friends/commands/graph.rb
friends-0.45 lib/friends/commands/graph.rb