Class: StructuraidCore::Elements::Column::Rectangular
- Defined in:
- lib/structuraid_core/elements/column/rectangular.rb
Instance Attribute Summary collapse
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#length_1 ⇒ Object
readonly
Returns the value of attribute length_1.
-
#length_2 ⇒ Object
readonly
Returns the value of attribute length_2.
-
#material ⇒ Object
readonly
Returns the value of attribute material.
Instance Method Summary collapse
-
#initialize(length_1:, length_2:, height:, material:, label: nil) ⇒ Rectangular
constructor
A new instance of Rectangular.
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
#height ⇒ Object (readonly)
Returns the value of attribute height.
5 6 7 |
# File 'lib/structuraid_core/elements/column/rectangular.rb', line 5 def height @height end |
#label ⇒ Object (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_1 ⇒ Object (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_2 ⇒ Object (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 |
#material ⇒ Object (readonly)
Returns the value of attribute material.
5 6 7 |
# File 'lib/structuraid_core/elements/column/rectangular.rb', line 5 def material @material end |