Class: GTK::Margin

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMargin

Returns a new instance of Margin.


9
10
11
12
13
14
# File 'dragon/layout.rb', line 9

def initialize
  @left   = 0
  @right  = 0
  @top    = 0
  @bottom = 0
end

Instance Attribute Details

#bottomObject (readonly)

Returns the value of attribute bottom


7
8
9
# File 'dragon/layout.rb', line 7

def bottom
  @bottom
end

#leftObject (readonly)

Returns the value of attribute left


7
8
9
# File 'dragon/layout.rb', line 7

def left
  @left
end

#rightObject (readonly)

Returns the value of attribute right


7
8
9
# File 'dragon/layout.rb', line 7

def right
  @right
end

#topObject (readonly)

Returns the value of attribute top


7
8
9
# File 'dragon/layout.rb', line 7

def top
  @top
end

Instance Method Details

#inspectObject


25
26
27
# File 'dragon/layout.rb', line 25

def inspect
  serialize.to_s
end

#serializeObject


16
17
18
19
20
21
22
23
# File 'dragon/layout.rb', line 16

def serialize
  {
    left:   @left,
    right:  @right,
    top:    @top,
    bottom: @bottom,
  }
end

#to_sObject


29
30
31
# File 'dragon/layout.rb', line 29

def to_s
  serialize.to_s
end