Class: Nachos::CLI

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ CLI

Returns a new instance of CLI.



6
7
8
9
# File 'lib/nachos/cli.rb', line 6

def initialize(*args)
  @main = Nachos::Main.new(self)
  super
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



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

def config
  @config
end

#mainObject (readonly)

Returns the value of attribute main.



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

def main
  @main
end

Instance Method Details

#infoObject



12
13
14
# File 'lib/nachos/cli.rb', line 12

def info
  shell.say main.info
end

#syncObject



24
25
26
27
# File 'lib/nachos/cli.rb', line 24

def sync
  shell.say main.github_summary
  main.sync
end

#watchedObject



17
18
19
20
21
# File 'lib/nachos/cli.rb', line 17

def watched
  main.watched.each do |repo|
    shell.say "#{repo.owner}/#{repo.name} - #{repo.description}"
  end
end