Class: KingOfTime
- Inherits:
-
Object
- Object
- KingOfTime
- Defined in:
- lib/king_of_time.rb,
lib/king_of_time/version.rb
Overview
Main class
Constant Summary collapse
- END_POINT =
'https://kingoftime-recorder.appspot.com/ajax?function=record_timestamp_and_log'.freeze
- VERSION =
'0.2.0'.freeze
Instance Method Summary collapse
- #check_in ⇒ Object
- #check_out ⇒ Object
- #end_break ⇒ Object
-
#initialize(name:, employee_id:, timerecorder_id:, password:) ⇒ KingOfTime
constructor
A new instance of KingOfTime.
- #start_break ⇒ Object
Constructor Details
#initialize(name:, employee_id:, timerecorder_id:, password:) ⇒ KingOfTime
Returns a new instance of KingOfTime.
9 10 11 12 13 14 15 |
# File 'lib/king_of_time.rb', line 9 def initialize(name:, employee_id:, timerecorder_id:, password:) @param = {} @param[:name] = name @param[:employee_id] = employee_id @param[:timerecorder_id] = @param[:employee_timerecorder_id] = timerecorder_id @param[:password] = password end |
Instance Method Details
#check_in ⇒ Object
17 18 19 |
# File 'lib/king_of_time.rb', line 17 def check_in http_request(:checkin) end |
#check_out ⇒ Object
21 22 23 |
# File 'lib/king_of_time.rb', line 21 def check_out http_request(:checkout) end |
#end_break ⇒ Object
30 31 32 |
# File 'lib/king_of_time.rb', line 30 def end_break http_request(:end_break) end |
#start_break ⇒ Object
26 27 28 |
# File 'lib/king_of_time.rb', line 26 def start_break http_request(:start_break) end |