Class: Fasteners::Nut

Inherits:
Object
  • Object
show all
Defined in:
lib/fasteners/nut.rb

Overview

Direct Known Subclasses

Metric::Nut

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**options) ⇒ Nut

Returns a new instance of Nut.



24
25
26
# File 'lib/fasteners/nut.rb', line 24

def initialize(**options)
    options.each {|k,v| respond_to?(k) && instance_variable_set("@#{k}", v) }
end

Instance Attribute Details

#heightObject 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_diameterObject 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

#typeObject

Returns the value of attribute type.



22
23
24
# File 'lib/fasteners/nut.rb', line 22

def type
  @type
end

#widthObject Also known as: indiameter

Returns the value of attribute width.



17
18
19
# File 'lib/fasteners/nut.rb', line 17

def width
  @width
end