Module: Fabriq::CLI

Extended by:
CLI
Included in:
CLI
Defined in:
lib/fabriq/cli.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#skypeObject

Returns the value of attribute skype.



5
6
7
# File 'lib/fabriq/cli.rb', line 5

def skype
  @skype
end

Instance Method Details

#list_available_roomsObject



20
21
22
23
24
25
26
27
# File 'lib/fabriq/cli.rb', line 20

def list_available_rooms
  cli_out "\n*** Available Rooms: ***\n"
  
  skype.rooms.each do |room|
    topic = room.topic == "" ? "<not set>" : room.topic
    cli_out "* ID: %s\t Topic: %s" % [room.id, topic]
  end
end

#run(args) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/fabriq/cli.rb', line 11

def run(args)
  case args.first
  when "rooms"
    list_available_rooms
  end

  exit(0)
end