Class: RedDrop

Inherits:
Object
  • Object
show all
Defined in:
lib/red_drop.rb,
lib/red_drop/version.rb

Constant Summary collapse

VERSION =
"0.5.0"

Instance Method Summary collapse

Constructor Details

#initializeRedDrop

Returns a new instance of RedDrop.



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

def initialize
  client = Auth.new.token

  @task_menu = {
    "create" => Create.new(client),
    "status" => Status.new(client),
    "delete" => Delete.new(client)
  }
end

Instance Method Details

#beginObject



17
18
19
20
21
22
23
24
25
26
27
# File 'lib/red_drop.rb', line 17

def begin
  input = nil

  until input.eql? "exit"
    puts "\nEnter from task menu below.\n#{@task_menu.keys << "exit"}\n\n"

    input = gets.chomp 

    @task_menu[input].execute if @task_menu.has_key? input
  end
end