Class: Fasteners::Washer
- Inherits:
-
Object
- Object
- Fasteners::Washer
- Defined in:
- lib/fasteners/washer.rb
Overview
A generic Washer en.wikipedia.org/wiki/Washer_(hardware)
Instance Attribute Summary collapse
-
#inner_diameter ⇒ Object
(also: #hole_diameter)
Returns the value of attribute inner_diameter.
-
#outer_diameter ⇒ Object
(also: #diameter)
Returns the value of attribute outer_diameter.
-
#thickness ⇒ Object
Returns the value of attribute thickness.
Instance Method Summary collapse
-
#initialize(**options) ⇒ Washer
constructor
A new instance of Washer.
Constructor Details
#initialize(**options) ⇒ Washer
Returns a new instance of Washer.
19 20 21 |
# File 'lib/fasteners/washer.rb', line 19 def initialize(**) .each {|k,v| respond_to?(k) && instance_variable_set("@#{k}", v) } end |
Instance Attribute Details
#inner_diameter ⇒ Object Also known as: hole_diameter
Returns the value of attribute inner_diameter.
11 12 13 |
# File 'lib/fasteners/washer.rb', line 11 def inner_diameter @inner_diameter end |
#outer_diameter ⇒ Object Also known as: diameter
Returns the value of attribute outer_diameter.
16 17 18 |
# File 'lib/fasteners/washer.rb', line 16 def outer_diameter @outer_diameter end |
#thickness ⇒ Object
Returns the value of attribute thickness.
7 8 9 |
# File 'lib/fasteners/washer.rb', line 7 def thickness @thickness end |