Class: StructuraidCore::Elements::Column::Rectangular

Inherits:
Base
  • Object
show all
Defined in:
lib/structuraid_core/elements/column/rectangular.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(length_1:, length_2:, height:, material:, label: nil) ⇒ Rectangular

Returns a new instance of Rectangular.



7
8
9
10
11
12
13
# File 'lib/structuraid_core/elements/column/rectangular.rb', line 7

def initialize(length_1:, length_2:, height:, material:, label: nil)
  @length_1 = length_1.to_f
  @length_2 = length_2.to_f
  @height = height.to_f
  @material = material
  @label = label&.to_sym
end

Instance Attribute Details

#heightObject (readonly)

Returns the value of attribute height.



5
6
7
# File 'lib/structuraid_core/elements/column/rectangular.rb', line 5

def height
  @height
end

#labelObject (readonly)

Returns the value of attribute label.



5
6
7
# File 'lib/structuraid_core/elements/column/rectangular.rb', line 5

def label
  @label
end

#length_1Object (readonly)

Returns the value of attribute length_1.



5
6
7
# File 'lib/structuraid_core/elements/column/rectangular.rb', line 5

def length_1
  @length_1
end

#length_2Object (readonly)

Returns the value of attribute length_2.



5
6
7
# File 'lib/structuraid_core/elements/column/rectangular.rb', line 5

def length_2
  @length_2
end

#materialObject (readonly)

Returns the value of attribute material.



5
6
7
# File 'lib/structuraid_core/elements/column/rectangular.rb', line 5

def material
  @material
end