Class: Ppl::Command::Init

Inherits:
Application::Command show all
Defined in:
lib/ppl/command/init.rb

Instance Attribute Summary

Attributes inherited from Application::Command

#storage

Instance Method Summary collapse

Methods inherited from Application::Command

add_property

Instance Method Details

#execute(input, output) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/ppl/command/init.rb', line 10

def execute(input, output)

  path = input.arguments.shift
  if path.nil?
    path = Dir.pwd
  end

  storage = Ppl::Adapter::Storage::Git.create_address_book(path)

  return true
end

#options(parser, options) ⇒ Object



6
7
8
# File 'lib/ppl/command/init.rb', line 6

def options(parser, options)
  parser.banner = "usage: ppl init [directory]"
end