Class: PDF::Inspector::Graphics::Rectangle
- Inherits:
-
PDF::Inspector
- Object
- PDF::Inspector
- PDF::Inspector::Graphics::Rectangle
- Defined in:
- lib/pdf/inspector/graphics.rb
Instance Attribute Summary collapse
-
#rectangles ⇒ Object
readonly
Returns the value of attribute rectangles.
Instance Method Summary collapse
- #append_rectangle(*params) ⇒ Object
-
#initialize ⇒ Rectangle
constructor
A new instance of Rectangle.
Methods inherited from PDF::Inspector
Constructor Details
#initialize ⇒ Rectangle
Returns a new instance of Rectangle.
28 29 30 |
# File 'lib/pdf/inspector/graphics.rb', line 28 def initialize @rectangles = [] end |
Instance Attribute Details
#rectangles ⇒ Object (readonly)
Returns the value of attribute rectangles.
26 27 28 |
# File 'lib/pdf/inspector/graphics.rb', line 26 def rectangles @rectangles end |
Instance Method Details
#append_rectangle(*params) ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/pdf/inspector/graphics.rb', line 32 def append_rectangle(*params) @rectangles << { point: params[0..1], width: params[2], height: params[3] } end |