Class: Dxf::FloorPlan::Block

Inherits:
Object
  • Object
show all
Defined in:
lib/dxf/floor_plan.rb

Direct Known Subclasses

Bidet

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#commentsObject (readonly)

Returns the value of attribute comments.



344
345
346
# File 'lib/dxf/floor_plan.rb', line 344

def comments
  @comments
end

#fixture_nameObject (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

#lengthObject (readonly)

Returns the value of attribute length.



344
345
346
# File 'lib/dxf/floor_plan.rb', line 344

def length
  @length
end

#rotObject (readonly)

Returns the value of attribute rot.



344
345
346
# File 'lib/dxf/floor_plan.rb', line 344

def rot
  @rot
end

#widthObject (readonly)

Returns the value of attribute width.



344
345
346
# File 'lib/dxf/floor_plan.rb', line 344

def width
  @width
end

#xObject (readonly)

Returns the value of attribute x.



344
345
346
# File 'lib/dxf/floor_plan.rb', line 344

def x
  @x
end

#yObject (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