Class: Vkhal::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/vkhal/cli.rb

Instance Method Summary collapse

Constructor Details

#initializeCLI

Returns a new instance of CLI.



3
4
5
# File 'lib/vkhal/cli.rb', line 3

def initialize
  @options = options_parse
end

Instance Method Details

#performObject



7
8
9
10
11
12
13
14
15
# File 'lib/vkhal/cli.rb', line 7

def perform
  if @options[:khal]
    ks = KhalService.new(file: @options[:khal])
    ks.import!
  elsif @options[:show]
    p = Presenter.new(events: events_parse(@options[:show]))
    p.display
  end
end