Class: Retab::BBox
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::BBox
- Defined in:
- lib/retab/workflow_artifacts/b_box.rb
Constant Summary collapse
- HASH_ATTRS =
{ left: :left, top: :top, width: :width, height: :height, page: :page }.freeze
Instance Attribute Summary collapse
-
#height ⇒ Object
Returns the value of attribute height.
-
#left ⇒ Object
Returns the value of attribute left.
-
#page ⇒ Object
Returns the value of attribute page.
-
#top ⇒ Object
Returns the value of attribute top.
-
#width ⇒ Object
Returns the value of attribute width.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ BBox
constructor
A new instance of BBox.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ BBox
Returns a new instance of BBox.
23 24 25 26 27 28 29 30 |
# File 'lib/retab/workflow_artifacts/b_box.rb', line 23 def initialize(json) hash = self.class.normalize(json) @left = hash[:left] @top = hash[:top] @width = hash[:width] @height = hash[:height] @page = hash[:page] end |
Instance Attribute Details
#height ⇒ Object
Returns the value of attribute height.
16 17 18 |
# File 'lib/retab/workflow_artifacts/b_box.rb', line 16 def height @height end |
#left ⇒ Object
Returns the value of attribute left.
16 17 18 |
# File 'lib/retab/workflow_artifacts/b_box.rb', line 16 def left @left end |
#page ⇒ Object
Returns the value of attribute page.
16 17 18 |
# File 'lib/retab/workflow_artifacts/b_box.rb', line 16 def page @page end |
#top ⇒ Object
Returns the value of attribute top.
16 17 18 |
# File 'lib/retab/workflow_artifacts/b_box.rb', line 16 def top @top end |
#width ⇒ Object
Returns the value of attribute width.
16 17 18 |
# File 'lib/retab/workflow_artifacts/b_box.rb', line 16 def width @width end |