Class: Qt::DateTime
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
permalink ._load(str) ⇒ Object
[View source]
360 361 362 363 |
# File 'lib/ruber/qt_sugar.rb', line 360 def self._load str date, time, time_spec = Marshal.load str self.new date, time, time_spec end |
permalink .yaml_new(cls, tag, val) ⇒ Object
[View source]
341 342 343 344 |
# File 'lib/ruber/qt_sugar.rb', line 341 def self.yaml_new cls, tag, val date, time, spec = val['date'], val['time'], val['time_spec'] Qt::DateTime.new date, time, spec end |
Instance Method Details
permalink #_dump(_) ⇒ Object
[View source]
356 357 358 |
# File 'lib/ruber/qt_sugar.rb', line 356 def _dump _ Marshal.dump [date, time, time_spec] end |
permalink #to_yaml(opts = {}) ⇒ Object
[View source]
346 347 348 349 350 351 352 353 354 |
# File 'lib/ruber/qt_sugar.rb', line 346 def to_yaml opts = {} YAML.quick_emit(self, opts) do |out| out.map(taguri, to_yaml_style) do |map| map.add 'date', date map.add 'time', time map.add 'time_spec', time_spec end end end |