Class: TripIt::TpDateTime
- Defined in:
- lib/trip_it/classes/tp_date_time.rb
Instance Attribute Summary collapse
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
Instance Method Summary collapse
-
#initialize(rubyDT) ⇒ TpDateTime
constructor
A new instance of TpDateTime.
Methods inherited from Base
#Boolean, #camelize, #chkAndPopulate, #chkObjAndPopulate, #convertDT, #to_hash, #to_json, #to_xml
Methods included from ParamUtil
#address_param, #airportcode_param, #array_param, #boolean_param, #boolean_read_param, #camelize, #date_param, #datetime_param, #exceptions, #float_param, #integer_param, #string_param, #time_param, #traveler_array_param, #traveler_param
Constructor Details
#initialize(rubyDT) ⇒ TpDateTime
Returns a new instance of TpDateTime.
5 6 7 8 9 |
# File 'lib/trip_it/classes/tp_date_time.rb', line 5 def initialize(rubyDT) return if rubyDT.nil? @date = rubyDT.strftime("%Y-%m-%d") @time = rubyDT.strftime("%H:%M:%S") end |
Instance Attribute Details
#date ⇒ Object (readonly)
Returns the value of attribute date.
3 4 5 |
# File 'lib/trip_it/classes/tp_date_time.rb', line 3 def date @date end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
3 4 5 |
# File 'lib/trip_it/classes/tp_date_time.rb', line 3 def time @time end |