Class: Qt::Size
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
._load(str) ⇒ Object
163 164 165 166 |
# File 'lib/ruber/qt_sugar.rb', line 163 def self._load str w, h = str.split ';' self.new w.to_i, h.to_i end |
Instance Method Details
#_dump(_) ⇒ Object
159 160 161 |
# File 'lib/ruber/qt_sugar.rb', line 159 def _dump _ "#{width};#{height}" end |
#to_yaml(opts = {}) ⇒ Object
150 151 152 153 154 155 156 157 |
# File 'lib/ruber/qt_sugar.rb', line 150 def to_yaml opts = {} YAML.quick_emit(self, opts) do |out| out.map(taguri, to_yaml_style) do |map| map.add 'width', width map.add 'height', height end end end |