Class: Qt::Date
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
._load(str) ⇒ Object
331 332 333 334 |
# File 'lib/ruber/qt_sugar.rb', line 331 def self._load str y, m, d = str.split ';' self.new(y.to_i, m.to_i, d.to_i) end |
Instance Method Details
#_dump(_) ⇒ Object
327 328 329 |
# File 'lib/ruber/qt_sugar.rb', line 327 def _dump _ "#{year};#{month};#{day}" end |
#to_yaml(opts = {}) ⇒ Object
317 318 319 320 321 322 323 324 325 |
# File 'lib/ruber/qt_sugar.rb', line 317 def to_yaml opts = {} YAML.quick_emit(self, opts) do |out| out.map(taguri, to_yaml_style) do |map| map.add 'year', year map.add 'month', month map.add 'day', day end end end |