Class: Dxf::FloorPlan::Block
- Inherits:
-
Object
- Object
- Dxf::FloorPlan::Block
- Defined in:
- lib/dxf/floor_plan.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#comments ⇒ Object
readonly
Returns the value of attribute comments.
-
#fixture_name ⇒ Object
readonly
Returns the value of attribute fixture_name.
-
#length ⇒ Object
readonly
Returns the value of attribute length.
-
#rot ⇒ Object
readonly
Returns the value of attribute rot.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
-
#x ⇒ Object
readonly
Returns the value of attribute x.
-
#y ⇒ Object
readonly
Returns the value of attribute y.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(fixture_hash) ⇒ Block
constructor
A new instance of Block.
Constructor Details
#initialize(fixture_hash) ⇒ Block
Returns a new instance of Block.
346 347 348 349 350 351 352 353 354 355 |
# File 'lib/dxf/floor_plan.rb', line 346 def initialize(fixture_hash) @x = fixture_hash['@x'] @y = fixture_hash['@y'] @length = fixture_hash['@length'] @width = fixture_hash['@width'] @rot = fixture_hash['@rotation'] @fixture_name = fixture_hash['@linkage'] @comments = fixture_hash['@comments'] @rot = -1 * rot.to_i end |
Instance Attribute Details
#comments ⇒ Object (readonly)
Returns the value of attribute comments.
344 345 346 |
# File 'lib/dxf/floor_plan.rb', line 344 def comments @comments end |
#fixture_name ⇒ Object (readonly)
Returns the value of attribute fixture_name.
344 345 346 |
# File 'lib/dxf/floor_plan.rb', line 344 def fixture_name @fixture_name end |
#length ⇒ Object (readonly)
Returns the value of attribute length.
344 345 346 |
# File 'lib/dxf/floor_plan.rb', line 344 def length @length end |
#rot ⇒ Object (readonly)
Returns the value of attribute rot.
344 345 346 |
# File 'lib/dxf/floor_plan.rb', line 344 def rot @rot end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
344 345 346 |
# File 'lib/dxf/floor_plan.rb', line 344 def width @width end |
#x ⇒ Object (readonly)
Returns the value of attribute x.
344 345 346 |
# File 'lib/dxf/floor_plan.rb', line 344 def x @x end |
#y ⇒ Object (readonly)
Returns the value of attribute y.
344 345 346 |
# File 'lib/dxf/floor_plan.rb', line 344 def y @y end |
Class Method Details
.build_and_initialize_fixture(fixture_hash) ⇒ Object
357 358 359 |
# File 'lib/dxf/floor_plan.rb', line 357 def self.build_and_initialize_fixture(fixture_hash) klass = fixture_hash['@linkage'].classify end |