Class: GoogleDataSource::DataSource::DataDateTime
- Inherits:
-
Object
- Object
- GoogleDataSource::DataSource::DataDateTime
- Defined in:
- lib/google_data_source/data_date_time.rb
Instance Method Summary collapse
- #as_json(options = nil) ⇒ Object
-
#initialize(datetime) ⇒ DataDateTime
constructor
A new instance of DataDateTime.
Constructor Details
#initialize(datetime) ⇒ DataDateTime
Returns a new instance of DataDateTime.
4 5 6 |
# File 'lib/google_data_source/data_date_time.rb', line 4 def initialize(datetime) @datetime = datetime end |
Instance Method Details
#as_json(options = nil) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/google_data_source/data_date_time.rb', line 8 def as_json(=nil) if @datetime "Date(#{@datetime.year}, #{@datetime.month-1}, #{@datetime.day}, #{@datetime.hour}, #{@datetime.min}, #{@datetime.sec})" else nil end end |