Class: Wedding::CLI

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

Overview

Command line interface for the wedding

Instance Method Summary collapse

Instance Method Details

#brideObject



39
40
41
# File 'lib/wedding/cli.rb', line 39

def bride
  puts Wedding.ceremony.bride
end

#groomObject



34
35
36
# File 'lib/wedding/cli.rb', line 34

def groom
  puts Wedding.ceremony.groom
end

#invitationObject



11
12
13
# File 'lib/wedding/cli.rb', line 11

def invitation
  puts Wedding.ceremony.invitation
end

#locationObject



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/wedding/cli.rb', line 16

def location
  puts map_location = Wedding.ceremony.location
  answer = yes?('Do you want to open this link in browser? (yes/no)')
  if (answer)
    begin
      Launchy.open(map_location)
    rescue StandardError => e
      puts "Sorry, you are probably not using a graphical terminal"
    end
  end
end

#rsvpObject



29
30
31
# File 'lib/wedding/cli.rb', line 29

def rsvp
  puts Wedding.ceremony.rsvp
end