Class: Qt::Size
Class Method Summary (collapse)
Instance Method Summary (collapse)
Class Method Details
+ (Object) _load(str)
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 |
+ (Object) yaml_new(cls, tag, val)
147 148 149 150 |
# File 'lib/ruber/qt_sugar.rb', line 147 def self.yaml_new cls, tag, val width, height= val['width'], val['height'] Qt::Size.new(width, height) end |
Instance Method Details
- (Object) _dump(_)
161 162 163 |
# File 'lib/ruber/qt_sugar.rb', line 161 def _dump _ "#{width};#{height}" end |
- (Object) to_yaml(opts = {})
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 |