rgviz 0.20 → 0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/rgviz/nodes.rb +9 -1
  2. metadata +3 -3
data/lib/rgviz/nodes.rb CHANGED
@@ -335,6 +335,10 @@ module Rgviz
335
335
  visitor.visit_date_column(self)
336
336
  visitor.end_visit_date_column self
337
337
  end
338
+
339
+ def to_s
340
+ "date '#{value.to_s}'"
341
+ end
338
342
  end
339
343
 
340
344
  class DateTimeColumn < ValueColumn
@@ -342,6 +346,10 @@ module Rgviz
342
346
  visitor.visit_date_time_column(self)
343
347
  visitor.end_visit_date_time_column self
344
348
  end
349
+
350
+ def to_s
351
+ "datetime '" + value.strftime("%Y-%m-%d %H:%M:%S") + "'"
352
+ end
345
353
  end
346
354
 
347
355
  class TimeOfDayColumn < ValueColumn
@@ -351,7 +359,7 @@ module Rgviz
351
359
  end
352
360
 
353
361
  def to_s
354
- "#{value.hour}:#{value.min}:#{value.sec}"
362
+ "timeofday '" + value.strftime("%H:%M:%S") + "'"
355
363
  end
356
364
  end
357
365
 
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rgviz
3
3
  version: !ruby/object:Gem::Version
4
- hash: 35
4
+ hash: 33
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 20
9
- version: "0.20"
8
+ - 21
9
+ version: "0.21"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ary Borenszweig