Class: Fasteners::Nut
- Inherits:
-
Object
- Object
- Fasteners::Nut
- Defined in:
- lib/fasteners/nut.rb
Overview
A generic Nut en.wikipedia.org/wiki/Nut_(hardware)
Direct Known Subclasses
Instance Attribute Summary collapse
-
#height ⇒ Object
(also: #thickness)
Returns the value of attribute height.
-
#hole_diameter ⇒ Object
(also: #diameter)
Returns the value of attribute hole_diameter.
-
#type ⇒ Object
Returns the value of attribute type.
-
#width ⇒ Object
(also: #indiameter)
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(**options) ⇒ Nut
constructor
A new instance of Nut.
Constructor Details
#initialize(**options) ⇒ Nut
Returns a new instance of Nut.
24 25 26 |
# File 'lib/fasteners/nut.rb', line 24 def initialize(**) .each {|k,v| respond_to?(k) && instance_variable_set("@#{k}", v) } end |
Instance Attribute Details
#height ⇒ Object Also known as: thickness
Returns the value of attribute height.
7 8 9 |
# File 'lib/fasteners/nut.rb', line 7 def height @height end |
#hole_diameter ⇒ Object Also known as: diameter
Returns the value of attribute hole_diameter.
12 13 14 |
# File 'lib/fasteners/nut.rb', line 12 def hole_diameter @hole_diameter end |
#type ⇒ Object
Returns the value of attribute type.
22 23 24 |
# File 'lib/fasteners/nut.rb', line 22 def type @type end |
#width ⇒ Object Also known as: indiameter
Returns the value of attribute width.
17 18 19 |
# File 'lib/fasteners/nut.rb', line 17 def width @width end |