17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/structuraid_core/design_codes/nsr_10/rc/footings/min_height.rb', line 17
def call
support_type = params.support_type || :over_soil
unless MIN_HEIGHT_MAPPINGS.keys.include?(support_type)
raise UnrecognizedValueError.new(:support_type, support_type)
end
min_height = MIN_HEIGHT_MAPPINGS[support_type]
return true if bottom_rebar_effective_height >= min_height
raise RequirementNotFulfilledError.new(
:min_height,
"Height #{bottom_rebar_effective_height} is below #{min_height} mininmum",
CODE_REFERENCE
)
end
|