Class: UECExpressApi
- Inherits:
-
Object
- Object
- UECExpressApi
- Defined in:
- lib/uec_express_api.rb
Constant Summary collapse
- @@debug =
false
Instance Attribute Summary collapse
-
#express ⇒ Object
writeonly
Sets the attribute express.
-
#updated ⇒ Object
writeonly
Sets the attribute updated.
Instance Method Summary collapse
-
#initialize ⇒ UECExpressApi
constructor
A new instance of UECExpressApi.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ UECExpressApi
Returns a new instance of UECExpressApi.
12 13 14 15 16 17 |
# File 'lib/uec_express_api.rb', line 12 def initialize() @updated = "" @express = Array.new parse_UEC_express() end |
Instance Attribute Details
#express=(value) ⇒ Object
Sets the attribute express
9 10 11 |
# File 'lib/uec_express_api.rb', line 9 def express=(value) @express = value end |
#updated=(value) ⇒ Object
Sets the attribute updated
9 10 11 |
# File 'lib/uec_express_api.rb', line 9 def updated=(value) @updated = value end |
Instance Method Details
#to_hash ⇒ Object
19 20 21 22 23 24 |
# File 'lib/uec_express_api.rb', line 19 def to_hash { :express => @express, :updated => @updated } end |
#to_json(*args) ⇒ Object
26 27 28 |
# File 'lib/uec_express_api.rb', line 26 def to_json(*args) to_hash().to_json(*args) 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 |