Class: UECExpressApi
- Inherits:
-
Object
- Object
- UECExpressApi
- Defined in:
- lib/uec_express_api.rb
Constant Summary collapse
- @@debug =
false
Instance Attribute Summary collapse
-
#express ⇒ Object
Returns the value of attribute express.
-
#updated ⇒ Object
Returns the value of attribute updated.
Instance Method Summary collapse
- #create_faculty_url ⇒ Object
- #create_gs_url ⇒ Object
-
#initialize(type = 1) ⇒ UECExpressApi
constructor
A new instance of UECExpressApi.
- #to_hash ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(type = 1) ⇒ UECExpressApi
Returns a new instance of UECExpressApi.
24 25 26 27 28 |
# File 'lib/uec_express_api.rb', line 24 def initialize(type=1) @updated = "" @express = Array.new parse(type) end |
Instance Attribute Details
#express ⇒ Object
Returns the value of attribute express.
21 22 23 |
# File 'lib/uec_express_api.rb', line 21 def express @express end |
#updated ⇒ Object
Returns the value of attribute updated.
21 22 23 |
# File 'lib/uec_express_api.rb', line 21 def updated @updated end |
Instance Method Details
#create_faculty_url ⇒ Object
40 41 42 |
# File 'lib/uec_express_api.rb', line 40 def create_faculty_url BASE_URL + FACULTY end |
#create_gs_url ⇒ Object
44 45 46 |
# File 'lib/uec_express_api.rb', line 44 def create_gs_url BASE_URL + GS end |
#to_hash ⇒ Object
48 49 50 51 52 53 |
# File 'lib/uec_express_api.rb', line 48 def to_hash { :express => @express, :updated => @updated } end |
#to_s ⇒ Object
30 31 32 33 34 35 36 37 38 |
# File 'lib/uec_express_api.rb', line 30 def to_s puts "-------------------------------------------------------------" puts "| class | data | time | subject | staff | remark |" @express.each do |ex| puts "| " + ex[:class].to_s + " | " + ex[:data].to_s + " | " + ex[:data].to_s + " | " + ex[:subject].to_s + " | " + ex[:staff].to_s + " | " + ex[:remark].to_s + " |" end puts "Last Updated :" + @updated puts "-------------------------------------------------------------" end |