Class: Rdpl::Box

Inherits:
Object
  • Object
show all
Includes:
LinesAndBoxes
Defined in:
lib/elements/box.rb

Constant Summary collapse

DEFAULT_CHARACTER =
'b'

Constants included from Element

Element::ROTATION_0_DEGREES, Element::ROTATION_180_DEGREES, Element::ROTATION_270_DEGREES, Element::ROTATION_90_DEGREES

Instance Attribute Summary collapse

Attributes included from LinesAndBoxes

#horizontal_width, #vertical_width

Instance Method Summary collapse

Methods included from LinesAndBoxes

#font_id, #height_multiplier=, #width_multiplier=

Methods included from Graphic

#data=, #font_id

Methods included from Element

#column_position, #column_position=, #data=, #font_id, #font_id=, #formatted_height, #height_multiplier, #height_multiplier=, #initialize, #rotation, #rotation=, #row_position, #row_position=, #to_s, #width_multiplier, #width_multiplier=

Instance Attribute Details

#bottom_and_top_thicknessObject



9
10
11
# File 'lib/elements/box.rb', line 9

def bottom_and_top_thickness
  @bottom_and_top_thickness || 0
end

#sides_thicknessObject



13
14
15
# File 'lib/elements/box.rb', line 13

def sides_thickness
  @sides_thickness || 0
end

Instance Method Details

#dataObject



17
18
19
20
21
22
23
# File 'lib/elements/box.rb', line 17

def data
  DEFAULT_CHARACTER + 
  formatted_horizontal_width + 
  formatted_vertical_width +
  formatted_bottom_and_top_thickness + 
  formatted_sides_thickness
end