Class: Fasteners::SocketHeadCapScrew

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

Overview

Your standard metric socket head cap screw en.wikipedia.org/wiki/ISO_metric_screw_thread

Instance Attribute Summary collapse

Attributes inherited from Bolt

#clearance_diameter, #diameter, #head_diameter, #head_length, #length

Instance Method Summary collapse

Constructor Details

#initialize(diameter, **options) ⇒ SocketHeadCapScrew

Returns a new instance of SocketHeadCapScrew.

Parameters:

  • diameter (Number)

    The nominal diameter of the screw



12
13
14
15
16
17
18
19
20
21
# File 'lib/fasteners/socket_head_cap_screw.rb', line 12

def initialize(diameter, **options)
    options[:diameter] = diameter
    options[:head_diameter] = 2 * diameter
    options[:head_length] = diameter

    @socket_depth = 0.75 * diameter
    @socket_diameter = 0.8 * diameter

    super **options
end

Instance Attribute Details

#socket_diameterObject

Returns the value of attribute socket_diameter.



9
10
11
# File 'lib/fasteners/socket_head_cap_screw.rb', line 9

def socket_diameter
  @socket_diameter
end