Class: Qt::Size
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
._load(str) ⇒ Object
165 166 167 168 |
# File 'lib/ruber/qt_sugar.rb', line 165 def self._load str w, h = str.split ';' self.new w.to_i, h.to_i end |
Instance Method Details
#_dump(_) ⇒ Object
161 162 163 |
# File 'lib/ruber/qt_sugar.rb', line 161 def _dump _ "#{width};#{height}" end |
#to_yaml(opts = {}) ⇒ Object
152 153 154 155 156 157 158 159 |
# File 'lib/ruber/qt_sugar.rb', line 152 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 |