Module: PagerJudy::CLI::CollectionBehaviour

Defined in:
lib/pager_judy/cli/collection_behaviour.rb

Overview

Common behaviour for sub-commands that operate on collections.

Defined Under Namespace

Modules: DataSubcommand, SummarySubcommand

Class Method Summary collapse

Class Method Details

.included(target) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/pager_judy/cli/collection_behaviour.rb', line 10

def self.included(target)
  target.default_subcommand = "summary"

  target.subcommand ["summary", "s"], "One-line summary" do
    include SummarySubcommand
  end

  target.subcommand ["data", "d"], "Full details" do
    include DataSubcommand
  end
end