Class: GTK::AspectRatio

Inherits:
Object show all
Defined in:
dragon/layout.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeAspectRatio

Returns a new instance of AspectRatio.


166
167
168
169
170
# File 'dragon/layout.rb', line 166

def initialize
  @w = 0
  @h = 0
  @u = 0
end

Instance Attribute Details

#hObject (readonly)

Returns the value of attribute h


164
165
166
# File 'dragon/layout.rb', line 164

def h
  @h
end

#uObject (readonly)

Returns the value of attribute u


164
165
166
# File 'dragon/layout.rb', line 164

def u
  @u
end

#wObject (readonly)

Returns the value of attribute w


164
165
166
# File 'dragon/layout.rb', line 164

def w
  @w
end

Instance Method Details

#inspectObject


180
181
182
# File 'dragon/layout.rb', line 180

def inspect
  serialize.to_s
end

#serializeObject


172
173
174
175
176
177
178
# File 'dragon/layout.rb', line 172

def serialize
  {
    w: @w,
    h: @h,
    u: @u
  }
end

#to_sObject


184
185
186
# File 'dragon/layout.rb', line 184

def to_s
  serialize.to_s
end