Class: GoogleDataSource::DataSource::DataDate

Inherits:
Object
  • Object
show all
Defined in:
lib/google_data_source/data_date.rb

Instance Method Summary collapse

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(options=nil)
  if @date
    "Date(#{@date.year}, #{@date.month-1}, #{@date.day})"
  else
    nil
  end
end