Class: UserCommandLineInterface
- Inherits:
-
Object
- Object
- UserCommandLineInterface
- Defined in:
- lib/ci_helper/user_command_line_interface.rb
Instance Attribute Summary collapse
-
#issue_monitor ⇒ Object
readonly
Returns the value of attribute issue_monitor.
Instance Method Summary collapse
- #get_ticket_no ⇒ Object
-
#initialize ⇒ UserCommandLineInterface
constructor
A new instance of UserCommandLineInterface.
- #queueing_question ⇒ Object
- #run ⇒ Object
- #ticket_question ⇒ Object
- #user_answer? ⇒ Boolean
Constructor Details
#initialize ⇒ UserCommandLineInterface
Returns a new instance of UserCommandLineInterface.
7 8 9 |
# File 'lib/ci_helper/user_command_line_interface.rb', line 7 def initialize @issue_monitor = IssueMonitor.new(CiConfig.ci_account, CiConfig.ci_password, ticket_no) end |
Instance Attribute Details
#issue_monitor ⇒ Object (readonly)
Returns the value of attribute issue_monitor.
5 6 7 |
# File 'lib/ci_helper/user_command_line_interface.rb', line 5 def issue_monitor @issue_monitor end |
Instance Method Details
#get_ticket_no ⇒ Object
20 21 22 |
# File 'lib/ci_helper/user_command_line_interface.rb', line 20 def get_ticket_no end |
#queueing_question ⇒ Object
28 29 30 31 |
# File 'lib/ci_helper/user_command_line_interface.rb', line 28 def queueing_question puts 'Your issue is queue or enter wrong issue number, do you want to wait the queue?' puts 'y\n' end |
#run ⇒ Object
11 12 13 |
# File 'lib/ci_helper/user_command_line_interface.rb', line 11 def run end |
#ticket_question ⇒ Object
24 25 26 |
# File 'lib/ci_helper/user_command_line_interface.rb', line 24 def ticket_question puts 'Please Input your next ticked number ' end |
#user_answer? ⇒ Boolean
15 16 17 18 |
# File 'lib/ci_helper/user_command_line_interface.rb', line 15 def user_answer? result = gets.chop result == 'y' || result == 'Y' end |