Class: Qt::Color
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
._load(str) ⇒ Object
302 303 304 305 |
# File 'lib/ruber/qt_sugar.rb', line 302 def self._load str r, g, b = str.split ';' self.new r.to_i, g.to_i, b.to_i end |
Instance Method Details
#_dump(_) ⇒ Object
298 299 300 |
# File 'lib/ruber/qt_sugar.rb', line 298 def _dump _ "#{red};#{green};#{blue}" end |
#to_yaml(opts = {}) ⇒ Object
288 289 290 291 292 293 294 295 296 |
# File 'lib/ruber/qt_sugar.rb', line 288 def to_yaml opts = {} YAML.quick_emit(self, opts) do |out| out.map(taguri, to_yaml_style) do |map| map.add 'red', red map.add 'green', green map.add 'blue', blue end end end |