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