Class: Wonde::Attendance
- Defined in:
- lib/endpoints/attendance.rb
Constant Summary collapse
- @@uri =
'attendance/session'
Instance Attribute Summary
Attributes inherited from Endpoints
#endpoint, #token, #uri, #version
Instance Method Summary collapse
-
#initialize(token, id = false) ⇒ Attendance
constructor
A new instance of Attendance.
- #sessionRegister(register) ⇒ Object
Methods inherited from Endpoints
#all, #delete, #deleteRequest, #deleteUrl, #get, #getRequest, #getUrl, #post, #postRequest, #postUrl
Constructor Details
#initialize(token, id = false) ⇒ Attendance
Returns a new instance of Attendance.
4 5 6 7 8 9 |
# File 'lib/endpoints/attendance.rb', line 4 def initialize(token, id=false) super(token, id) self.uri = @@uri self.uri = id + '/' + @@uri if id self.uri = self.uri.gsub("//", "/").chomp("/") end |
Instance Method Details
#sessionRegister(register) ⇒ Object
11 12 13 14 |
# File 'lib/endpoints/attendance.rb', line 11 def sessionRegister(register) throw InvalidSessionException unless register.class == SessionRegister return self.post(register) end |