You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1516 lines
65 KiB
1516 lines
65 KiB
<!DOCTYPE html> |
|
<html> |
|
<head> |
|
<meta charset="utf-8"> |
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
<title> |
|
Module: Validations::SoftValidations |
|
|
|
— Documentation by YARD 0.9.36 |
|
|
|
</title> |
|
|
|
<link rel="stylesheet" href="../css/style.css" type="text/css" /> |
|
|
|
<link rel="stylesheet" href="../css/common.css" type="text/css" /> |
|
|
|
<script type="text/javascript"> |
|
pathId = "Validations::SoftValidations"; |
|
relpath = '../'; |
|
</script> |
|
|
|
|
|
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script> |
|
|
|
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script> |
|
|
|
|
|
</head> |
|
<body> |
|
<div class="nav_wrap"> |
|
<iframe id="nav" src="../class_list.html?1"></iframe> |
|
<div id="resizer"></div> |
|
</div> |
|
|
|
<div id="main" tabindex="-1"> |
|
<div id="header"> |
|
<div id="menu"> |
|
|
|
<a href="../_index.html">Index (S)</a> » |
|
<span class='title'>Validations</span> |
|
» |
|
<span class="title">SoftValidations</span> |
|
|
|
</div> |
|
|
|
<div id="search"> |
|
|
|
<a class="full_list_link" id="class_list_link" |
|
href="../class_list.html"> |
|
|
|
<svg width="24" height="24"> |
|
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect> |
|
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect> |
|
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect> |
|
</svg> |
|
</a> |
|
|
|
</div> |
|
<div class="clear"></div> |
|
</div> |
|
|
|
<div id="content"><h1>Module: Validations::SoftValidations |
|
|
|
|
|
|
|
</h1> |
|
<div class="box_info"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl> |
|
<dt>Includes:</dt> |
|
<dd>ChargesHelper</dd> |
|
</dl> |
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl> |
|
<dt>Defined in:</dt> |
|
<dd>soft_validations.rb</dd> |
|
</dl> |
|
|
|
</div> |
|
|
|
|
|
|
|
<h2> |
|
Constant Summary |
|
<small><a href="#" class="constants_summary_toggle">collapse</a></small> |
|
</h2> |
|
|
|
<dl class="constants"> |
|
|
|
<dt id="ALLOWED_INCOME_RANGES-constant" class="">ALLOWED_INCOME_RANGES = |
|
|
|
</dt> |
|
<dd><pre class="code"><span class='lbrace'>{</span> |
|
<span class='int'>1</span> <span class='op'>=></span> <span class='const'>OpenStruct</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>soft_min:</span> <span class='int'>143</span><span class='comma'>,</span> <span class='label'>soft_max:</span> <span class='int'>730</span><span class='comma'>,</span> <span class='label'>hard_min:</span> <span class='int'>90</span><span class='comma'>,</span> <span class='label'>hard_max:</span> <span class='int'>1230</span><span class='rparen'>)</span><span class='comma'>,</span> |
|
<span class='int'>2</span> <span class='op'>=></span> <span class='const'>OpenStruct</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>soft_min:</span> <span class='int'>67</span><span class='comma'>,</span> <span class='label'>soft_max:</span> <span class='int'>620</span><span class='comma'>,</span> <span class='label'>hard_min:</span> <span class='int'>50</span><span class='comma'>,</span> <span class='label'>hard_max:</span> <span class='int'>950</span><span class='rparen'>)</span><span class='comma'>,</span> |
|
<span class='int'>3</span> <span class='op'>=></span> <span class='const'>OpenStruct</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>soft_min:</span> <span class='int'>80</span><span class='comma'>,</span> <span class='label'>soft_max:</span> <span class='int'>480</span><span class='comma'>,</span> <span class='label'>hard_min:</span> <span class='int'>40</span><span class='comma'>,</span> <span class='label'>hard_max:</span> <span class='int'>990</span><span class='rparen'>)</span><span class='comma'>,</span> |
|
<span class='int'>4</span> <span class='op'>=></span> <span class='const'>OpenStruct</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>soft_min:</span> <span class='int'>50</span><span class='comma'>,</span> <span class='label'>soft_max:</span> <span class='int'>370</span><span class='comma'>,</span> <span class='label'>hard_min:</span> <span class='int'>10</span><span class='comma'>,</span> <span class='label'>hard_max:</span> <span class='int'>450</span><span class='rparen'>)</span><span class='comma'>,</span> |
|
<span class='int'>5</span> <span class='op'>=></span> <span class='const'>OpenStruct</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>soft_min:</span> <span class='int'>50</span><span class='comma'>,</span> <span class='label'>soft_max:</span> <span class='int'>380</span><span class='comma'>,</span> <span class='label'>hard_min:</span> <span class='int'>10</span><span class='comma'>,</span> <span class='label'>hard_max:</span> <span class='int'>690</span><span class='rparen'>)</span><span class='comma'>,</span> |
|
<span class='int'>6</span> <span class='op'>=></span> <span class='const'>OpenStruct</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>soft_min:</span> <span class='int'>53</span><span class='comma'>,</span> <span class='label'>soft_max:</span> <span class='int'>540</span><span class='comma'>,</span> <span class='label'>hard_min:</span> <span class='int'>10</span><span class='comma'>,</span> <span class='label'>hard_max:</span> <span class='int'>890</span><span class='rparen'>)</span><span class='comma'>,</span> |
|
<span class='int'>7</span> <span class='op'>=></span> <span class='const'>OpenStruct</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>soft_min:</span> <span class='int'>47</span><span class='comma'>,</span> <span class='label'>soft_max:</span> <span class='int'>460</span><span class='comma'>,</span> <span class='label'>hard_min:</span> <span class='int'>10</span><span class='comma'>,</span> <span class='label'>hard_max:</span> <span class='int'>1300</span><span class='rparen'>)</span><span class='comma'>,</span> |
|
<span class='int'>8</span> <span class='op'>=></span> <span class='const'>OpenStruct</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>soft_min:</span> <span class='int'>54</span><span class='comma'>,</span> <span class='label'>soft_max:</span> <span class='int'>460</span><span class='comma'>,</span> <span class='label'>hard_min:</span> <span class='int'>10</span><span class='comma'>,</span> <span class='label'>hard_max:</span> <span class='int'>2000</span><span class='rparen'>)</span><span class='comma'>,</span> |
|
<span class='int'>9</span> <span class='op'>=></span> <span class='const'>OpenStruct</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>soft_min:</span> <span class='int'>50</span><span class='comma'>,</span> <span class='label'>soft_max:</span> <span class='int'>450</span><span class='comma'>,</span> <span class='label'>hard_min:</span> <span class='int'>10</span><span class='comma'>,</span> <span class='label'>hard_max:</span> <span class='int'>750</span><span class='rparen'>)</span><span class='comma'>,</span> |
|
<span class='int'>0</span> <span class='op'>=></span> <span class='const'>OpenStruct</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>soft_min:</span> <span class='int'>50</span><span class='comma'>,</span> <span class='label'>soft_max:</span> <span class='int'>580</span><span class='comma'>,</span> <span class='label'>hard_min:</span> <span class='int'>10</span><span class='comma'>,</span> <span class='label'>hard_max:</span> <span class='int'>1040</span><span class='rparen'>)</span><span class='comma'>,</span> |
|
<span class='int'>10</span> <span class='op'>=></span> <span class='const'>OpenStruct</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>soft_min:</span> <span class='int'>47</span><span class='comma'>,</span> <span class='label'>soft_max:</span> <span class='int'>730</span><span class='comma'>,</span> <span class='label'>hard_min:</span> <span class='int'>10</span><span class='comma'>,</span> <span class='label'>hard_max:</span> <span class='int'>2000</span><span class='rparen'>)</span><span class='comma'>,</span> |
|
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd> |
|
|
|
<dt id="TWO_YEARS_IN_DAYS-constant" class="">TWO_YEARS_IN_DAYS = |
|
|
|
</dt> |
|
<dd><pre class="code"><span class='int'>730</span></pre></dd> |
|
|
|
<dt id="TEN_YEARS_IN_DAYS-constant" class="">TEN_YEARS_IN_DAYS = |
|
|
|
</dt> |
|
<dd><pre class="code"><span class='int'>3650</span></pre></dd> |
|
|
|
<dt id="PHRASES_LIKELY_TO_INDICATE_EXISTING_REASON_CATEGORY-constant" class="">PHRASES_LIKELY_TO_INDICATE_EXISTING_REASON_CATEGORY = |
|
|
|
</dt> |
|
<dd><pre class="code"><span class='lbracket'>[</span> |
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Decant</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> |
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Decanted</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> |
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Refugee</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> |
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Asylum</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> |
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Ukraine</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> |
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Ukrainian</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> |
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Army</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> |
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Military</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> |
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Domestic Abuse</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> |
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Domestic Violence</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> |
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>DA</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> |
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>DV</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> |
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Relationship breakdown</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> |
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Overcrowding</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> |
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Overcrowded</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> |
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Too small</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> |
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>More space</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> |
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Bigger property</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> |
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Damp</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> |
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Mould</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> |
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Fire</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> |
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Repossession</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> |
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Death</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> |
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Deceased</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> |
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Passed away</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> |
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Prison</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> |
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Hospital</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> |
|
<span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd> |
|
|
|
<dt id="PHRASES_LIKELY_TO_INDICATE_EXISTING_REASON_CATEGORY_REGEX-constant" class="">PHRASES_LIKELY_TO_INDICATE_EXISTING_REASON_CATEGORY_REGEX = |
|
|
|
</dt> |
|
<dd><pre class="code"><span class='const'>Regexp</span><span class='period'>.</span><span class='id identifier rubyid_union'>union</span><span class='lparen'>(</span> |
|
<span class='const'><span class='object_link'><a href="#PHRASES_LIKELY_TO_INDICATE_EXISTING_REASON_CATEGORY-constant" title="Validations::SoftValidations::PHRASES_LIKELY_TO_INDICATE_EXISTING_REASON_CATEGORY (constant)">PHRASES_LIKELY_TO_INDICATE_EXISTING_REASON_CATEGORY</a></span></span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_phrase'>phrase</span><span class='op'>|</span> <span class='const'>Regexp</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\b[^[:alpha]]*</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_phrase'>phrase</span><span class='embexpr_end'>}</span><span class='tstring_content'>[^[:alpha:]]*\\b</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='const'>Regexp</span><span class='op'>::</span><span class='const'>IGNORECASE</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='comma'>,</span> |
|
<span class='rparen'>)</span></pre></dd> |
|
|
|
</dl> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h2> |
|
Instance Method Summary |
|
<small><a href="#" class="summary_toggle">collapse</a></small> |
|
</h2> |
|
|
|
<ul class="summary"> |
|
|
|
<li class="public "> |
|
<span class="summary_signature"> |
|
|
|
<a href="#all_tenants_age_and_gender_information_completed%3F-instance_method" title="#all_tenants_age_and_gender_information_completed? (instance method)">#<strong>all_tenants_age_and_gender_information_completed?</strong> ⇒ Boolean </a> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span> |
|
|
|
</li> |
|
|
|
|
|
<li class="public "> |
|
<span class="summary_signature"> |
|
|
|
<a href="#all_tenants_gender_information_completed%3F-instance_method" title="#all_tenants_gender_information_completed? (instance method)">#<strong>all_tenants_gender_information_completed?</strong> ⇒ Boolean </a> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span> |
|
|
|
</li> |
|
|
|
|
|
<li class="public "> |
|
<span class="summary_signature"> |
|
|
|
<a href="#female_in_pregnant_household_in_soft_validation_range%3F-instance_method" title="#female_in_pregnant_household_in_soft_validation_range? (instance method)">#<strong>female_in_pregnant_household_in_soft_validation_range?</strong> ⇒ Boolean </a> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span> |
|
|
|
</li> |
|
|
|
|
|
<li class="public "> |
|
<span class="summary_signature"> |
|
|
|
<a href="#major_repairs_date_in_soft_range%3F-instance_method" title="#major_repairs_date_in_soft_range? (instance method)">#<strong>major_repairs_date_in_soft_range?</strong> ⇒ Boolean </a> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span> |
|
|
|
</li> |
|
|
|
|
|
<li class="public "> |
|
<span class="summary_signature"> |
|
|
|
<a href="#multiple_partners%3F-instance_method" title="#multiple_partners? (instance method)">#<strong>multiple_partners?</strong> ⇒ Boolean </a> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span> |
|
|
|
</li> |
|
|
|
|
|
<li class="public "> |
|
<span class="summary_signature"> |
|
|
|
<a href="#net_income_higher_or_lower_text-instance_method" title="#net_income_higher_or_lower_text (instance method)">#<strong>net_income_higher_or_lower_text</strong> ⇒ Object </a> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span> |
|
|
|
</li> |
|
|
|
|
|
<li class="public "> |
|
<span class="summary_signature"> |
|
|
|
<a href="#net_income_in_soft_max_range%3F-instance_method" title="#net_income_in_soft_max_range? (instance method)">#<strong>net_income_in_soft_max_range?</strong> ⇒ Boolean </a> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span> |
|
|
|
</li> |
|
|
|
|
|
<li class="public "> |
|
<span class="summary_signature"> |
|
|
|
<a href="#net_income_in_soft_min_range%3F-instance_method" title="#net_income_in_soft_min_range? (instance method)">#<strong>net_income_in_soft_min_range?</strong> ⇒ Boolean </a> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span> |
|
|
|
</li> |
|
|
|
|
|
<li class="public "> |
|
<span class="summary_signature"> |
|
|
|
<a href="#no_females_in_a_pregnant_household%3F-instance_method" title="#no_females_in_a_pregnant_household? (instance method)">#<strong>no_females_in_a_pregnant_household?</strong> ⇒ Boolean </a> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span> |
|
|
|
</li> |
|
|
|
|
|
<li class="public "> |
|
<span class="summary_signature"> |
|
|
|
<a href="#pscharge_in_soft_max_range%3F-instance_method" title="#pscharge_in_soft_max_range? (instance method)">#<strong>pscharge_in_soft_max_range?</strong> ⇒ Boolean </a> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span> |
|
|
|
</li> |
|
|
|
|
|
<li class="public "> |
|
<span class="summary_signature"> |
|
|
|
<a href="#reasonother_might_be_existing_category%3F-instance_method" title="#reasonother_might_be_existing_category? (instance method)">#<strong>reasonother_might_be_existing_category?</strong> ⇒ Boolean </a> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span> |
|
|
|
</li> |
|
|
|
|
|
<li class="public "> |
|
<span class="summary_signature"> |
|
|
|
<a href="#rent_in_soft_max_range%3F-instance_method" title="#rent_in_soft_max_range? (instance method)">#<strong>rent_in_soft_max_range?</strong> ⇒ Boolean </a> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span> |
|
|
|
</li> |
|
|
|
|
|
<li class="public "> |
|
<span class="summary_signature"> |
|
|
|
<a href="#rent_in_soft_min_range%3F-instance_method" title="#rent_in_soft_min_range? (instance method)">#<strong>rent_in_soft_min_range?</strong> ⇒ Boolean </a> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span> |
|
|
|
</li> |
|
|
|
|
|
<li class="public "> |
|
<span class="summary_signature"> |
|
|
|
<a href="#scharge_in_soft_max_range%3F-instance_method" title="#scharge_in_soft_max_range? (instance method)">#<strong>scharge_in_soft_max_range?</strong> ⇒ Boolean </a> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span> |
|
|
|
</li> |
|
|
|
|
|
<li class="public "> |
|
<span class="summary_signature"> |
|
|
|
<a href="#supcharg_in_soft_max_range%3F-instance_method" title="#supcharg_in_soft_max_range? (instance method)">#<strong>supcharg_in_soft_max_range?</strong> ⇒ Boolean </a> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span> |
|
|
|
</li> |
|
|
|
|
|
<li class="public "> |
|
<span class="summary_signature"> |
|
|
|
<a href="#voiddate_in_soft_range%3F-instance_method" title="#voiddate_in_soft_range? (instance method)">#<strong>voiddate_in_soft_range?</strong> ⇒ Boolean </a> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span> |
|
|
|
</li> |
|
|
|
|
|
</ul> |
|
|
|
|
|
|
|
|
|
|
|
<div id="instance_method_details" class="method_details_list"> |
|
<h2>Instance Method Details</h2> |
|
|
|
|
|
<div class="method_details first"> |
|
<h3 class="signature first" id="all_tenants_age_and_gender_information_completed?-instance_method"> |
|
|
|
#<strong>all_tenants_age_and_gender_information_completed?</strong> ⇒ <tt>Boolean</tt> |
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring"> |
|
<div class="discussion"> |
|
|
|
|
|
</div> |
|
</div> |
|
<div class="tags"> |
|
|
|
<p class="tag_title">Returns:</p> |
|
<ul class="return"> |
|
|
|
<li> |
|
|
|
|
|
<span class='type'>(<tt>Boolean</tt>)</span> |
|
|
|
|
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</div><table class="source_code"> |
|
<tr> |
|
<td> |
|
<pre class="lines"> |
|
|
|
|
|
78 |
|
79 |
|
80 |
|
81 |
|
82 |
|
83 |
|
84</pre> |
|
</td> |
|
<td> |
|
<pre class="code"><span class="info file"># File 'soft_validations.rb', line 78</span> |
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_all_tenants_age_and_gender_information_completed?'>all_tenants_age_and_gender_information_completed?</span> |
|
<span class='id identifier rubyid_person_count'>person_count</span> <span class='op'>=</span> <span class='id identifier rubyid_hhmemb'>hhmemb</span> <span class='op'>||</span> <span class='int'>8</span> |
|
|
|
<span class='lparen'>(</span><span class='int'>1</span><span class='op'>..</span><span class='id identifier rubyid_person_count'>person_count</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_all?'>all?</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_n'>n</span><span class='op'>|</span> |
|
<span class='id identifier rubyid_public_send'>public_send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>sex</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_n'>n</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span> <span class='op'>&&</span> <span class='id identifier rubyid_public_send'>public_send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>age</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_n'>n</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span> <span class='op'>&&</span> <span class='id identifier rubyid_details_known_or_lead_tenant?'>details_known_or_lead_tenant?</span><span class='lparen'>(</span><span class='id identifier rubyid_n'>n</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='id identifier rubyid_public_send'>public_send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>age</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_n'>n</span><span class='embexpr_end'>}</span><span class='tstring_content'>_known</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span> <span class='op'>&&</span> <span class='id identifier rubyid_public_send'>public_send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>age</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_n'>n</span><span class='embexpr_end'>}</span><span class='tstring_content'>_known</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_zero?'>zero?</span> |
|
<span class='kw'>end</span> |
|
<span class='kw'>end</span></pre> |
|
</td> |
|
</tr> |
|
</table> |
|
</div> |
|
|
|
<div class="method_details "> |
|
<h3 class="signature " id="all_tenants_gender_information_completed?-instance_method"> |
|
|
|
#<strong>all_tenants_gender_information_completed?</strong> ⇒ <tt>Boolean</tt> |
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring"> |
|
<div class="discussion"> |
|
|
|
|
|
</div> |
|
</div> |
|
<div class="tags"> |
|
|
|
<p class="tag_title">Returns:</p> |
|
<ul class="return"> |
|
|
|
<li> |
|
|
|
|
|
<span class='type'>(<tt>Boolean</tt>)</span> |
|
|
|
|
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</div><table class="source_code"> |
|
<tr> |
|
<td> |
|
<pre class="lines"> |
|
|
|
|
|
86 |
|
87 |
|
88 |
|
89 |
|
90 |
|
91 |
|
92</pre> |
|
</td> |
|
<td> |
|
<pre class="code"><span class="info file"># File 'soft_validations.rb', line 86</span> |
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_all_tenants_gender_information_completed?'>all_tenants_gender_information_completed?</span> |
|
<span class='id identifier rubyid_person_count'>person_count</span> <span class='op'>=</span> <span class='id identifier rubyid_hhmemb'>hhmemb</span> <span class='op'>||</span> <span class='int'>8</span> |
|
|
|
<span class='lparen'>(</span><span class='int'>1</span><span class='op'>..</span><span class='id identifier rubyid_person_count'>person_count</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_all?'>all?</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_n'>n</span><span class='op'>|</span> |
|
<span class='id identifier rubyid_public_send'>public_send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>sex</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_n'>n</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span> <span class='op'>&&</span> <span class='id identifier rubyid_details_known_or_lead_tenant?'>details_known_or_lead_tenant?</span><span class='lparen'>(</span><span class='id identifier rubyid_n'>n</span><span class='rparen'>)</span> |
|
<span class='kw'>end</span> |
|
<span class='kw'>end</span></pre> |
|
</td> |
|
</tr> |
|
</table> |
|
</div> |
|
|
|
<div class="method_details "> |
|
<h3 class="signature " id="female_in_pregnant_household_in_soft_validation_range?-instance_method"> |
|
|
|
#<strong>female_in_pregnant_household_in_soft_validation_range?</strong> ⇒ <tt>Boolean</tt> |
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring"> |
|
<div class="discussion"> |
|
|
|
|
|
</div> |
|
</div> |
|
<div class="tags"> |
|
|
|
<p class="tag_title">Returns:</p> |
|
<ul class="return"> |
|
|
|
<li> |
|
|
|
|
|
<span class='type'>(<tt>Boolean</tt>)</span> |
|
|
|
|
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</div><table class="source_code"> |
|
<tr> |
|
<td> |
|
<pre class="lines"> |
|
|
|
|
|
74 |
|
75 |
|
76</pre> |
|
</td> |
|
<td> |
|
<pre class="code"><span class="info file"># File 'soft_validations.rb', line 74</span> |
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_female_in_pregnant_household_in_soft_validation_range?'>female_in_pregnant_household_in_soft_validation_range?</span> |
|
<span class='id identifier rubyid_all_tenants_age_and_gender_information_completed?'>all_tenants_age_and_gender_information_completed?</span> <span class='op'>&&</span> <span class='id identifier rubyid_females_in_the_household?'>females_in_the_household?</span> <span class='op'>&&</span> <span class='op'>!</span><span class='id identifier rubyid_females_in_age_range'>females_in_age_range</span><span class='lparen'>(</span><span class='int'>16</span><span class='comma'>,</span> <span class='int'>50</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='id identifier rubyid_preg_occ'>preg_occ</span> <span class='op'>==</span> <span class='int'>1</span> |
|
<span class='kw'>end</span></pre> |
|
</td> |
|
</tr> |
|
</table> |
|
</div> |
|
|
|
<div class="method_details "> |
|
<h3 class="signature " id="major_repairs_date_in_soft_range?-instance_method"> |
|
|
|
#<strong>major_repairs_date_in_soft_range?</strong> ⇒ <tt>Boolean</tt> |
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring"> |
|
<div class="discussion"> |
|
|
|
|
|
</div> |
|
</div> |
|
<div class="tags"> |
|
|
|
<p class="tag_title">Returns:</p> |
|
<ul class="return"> |
|
|
|
<li> |
|
|
|
|
|
<span class='type'>(<tt>Boolean</tt>)</span> |
|
|
|
|
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</div><table class="source_code"> |
|
<tr> |
|
<td> |
|
<pre class="lines"> |
|
|
|
|
|
97 |
|
98 |
|
99</pre> |
|
</td> |
|
<td> |
|
<pre class="code"><span class="info file"># File 'soft_validations.rb', line 97</span> |
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_major_repairs_date_in_soft_range?'>major_repairs_date_in_soft_range?</span> |
|
<span class='id identifier rubyid_mrcdate'>mrcdate</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span> <span class='op'>&&</span> <span class='id identifier rubyid_startdate'>startdate</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span> <span class='op'>&&</span> <span class='id identifier rubyid_mrcdate'>mrcdate</span><span class='period'>.</span><span class='id identifier rubyid_between?'>between?</span><span class='lparen'>(</span><span class='id identifier rubyid_startdate'>startdate</span><span class='period'>.</span><span class='id identifier rubyid_to_date'>to_date</span> <span class='op'>-</span> <span class='const'><span class='object_link'><a href="#TEN_YEARS_IN_DAYS-constant" title="Validations::SoftValidations::TEN_YEARS_IN_DAYS (constant)">TEN_YEARS_IN_DAYS</a></span></span><span class='comma'>,</span> <span class='id identifier rubyid_startdate'>startdate</span><span class='period'>.</span><span class='id identifier rubyid_to_date'>to_date</span> <span class='op'>-</span> <span class='const'><span class='object_link'><a href="#TWO_YEARS_IN_DAYS-constant" title="Validations::SoftValidations::TWO_YEARS_IN_DAYS (constant)">TWO_YEARS_IN_DAYS</a></span></span><span class='rparen'>)</span> |
|
<span class='kw'>end</span></pre> |
|
</td> |
|
</tr> |
|
</table> |
|
</div> |
|
|
|
<div class="method_details "> |
|
<h3 class="signature " id="multiple_partners?-instance_method"> |
|
|
|
#<strong>multiple_partners?</strong> ⇒ <tt>Boolean</tt> |
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring"> |
|
<div class="discussion"> |
|
|
|
|
|
</div> |
|
</div> |
|
<div class="tags"> |
|
|
|
<p class="tag_title">Returns:</p> |
|
<ul class="return"> |
|
|
|
<li> |
|
|
|
|
|
<span class='type'>(<tt>Boolean</tt>)</span> |
|
|
|
|
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</div><table class="source_code"> |
|
<tr> |
|
<td> |
|
<pre class="lines"> |
|
|
|
|
|
198 |
|
199 |
|
200 |
|
201 |
|
202 |
|
203</pre> |
|
</td> |
|
<td> |
|
<pre class="code"><span class="info file"># File 'soft_validations.rb', line 198</span> |
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_multiple_partners?'>multiple_partners?</span> |
|
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_hhmemb'>hhmemb</span> |
|
|
|
<span class='id identifier rubyid_max_person_with_details'>max_person_with_details</span> <span class='op'>=</span> <span class='id identifier rubyid_sales?'>sales?</span> <span class='op'>?</span> <span class='lbracket'>[</span><span class='id identifier rubyid_hhmemb'>hhmemb</span><span class='comma'>,</span> <span class='int'>6</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_min'>min</span> <span class='op'>:</span> <span class='lbracket'>[</span><span class='id identifier rubyid_hhmemb'>hhmemb</span><span class='comma'>,</span> <span class='int'>8</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_min'>min</span> |
|
<span class='lparen'>(</span><span class='int'>2</span><span class='op'>..</span><span class='id identifier rubyid_max_person_with_details'>max_person_with_details</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_many?'>many?</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_n'>n</span><span class='op'>|</span> <span class='id identifier rubyid_public_send'>public_send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>relat</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_n'>n</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>P</span><span class='tstring_end'>"</span></span> <span class='rbrace'>}</span> |
|
<span class='kw'>end</span></pre> |
|
</td> |
|
</tr> |
|
</table> |
|
</div> |
|
|
|
<div class="method_details "> |
|
<h3 class="signature " id="net_income_higher_or_lower_text-instance_method"> |
|
|
|
#<strong>net_income_higher_or_lower_text</strong> ⇒ <tt>Object</tt> |
|
|
|
|
|
|
|
|
|
|
|
</h3><table class="source_code"> |
|
<tr> |
|
<td> |
|
<pre class="lines"> |
|
|
|
|
|
105 |
|
106 |
|
107</pre> |
|
</td> |
|
<td> |
|
<pre class="code"><span class="info file"># File 'soft_validations.rb', line 105</span> |
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_net_income_higher_or_lower_text'>net_income_higher_or_lower_text</span> |
|
<span class='id identifier rubyid_net_income_in_soft_max_range?'>net_income_in_soft_max_range?</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>higher</span><span class='tstring_end'>"</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>lower</span><span class='tstring_end'>"</span></span> |
|
<span class='kw'>end</span></pre> |
|
</td> |
|
</tr> |
|
</table> |
|
</div> |
|
|
|
<div class="method_details "> |
|
<h3 class="signature " id="net_income_in_soft_max_range?-instance_method"> |
|
|
|
#<strong>net_income_in_soft_max_range?</strong> ⇒ <tt>Boolean</tt> |
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring"> |
|
<div class="discussion"> |
|
|
|
|
|
</div> |
|
</div> |
|
<div class="tags"> |
|
|
|
<p class="tag_title">Returns:</p> |
|
<ul class="return"> |
|
|
|
<li> |
|
|
|
|
|
<span class='type'>(<tt>Boolean</tt>)</span> |
|
|
|
|
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</div><table class="source_code"> |
|
<tr> |
|
<td> |
|
<pre class="lines"> |
|
|
|
|
|
18 |
|
19 |
|
20 |
|
21 |
|
22</pre> |
|
</td> |
|
<td> |
|
<pre class="code"><span class="info file"># File 'soft_validations.rb', line 18</span> |
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_net_income_in_soft_max_range?'>net_income_in_soft_max_range?</span> |
|
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_weekly_net_income'>weekly_net_income</span> <span class='op'>&&</span> <span class='id identifier rubyid_ecstat1'>ecstat1</span> <span class='op'>&&</span> <span class='id identifier rubyid_hhmemb'>hhmemb</span> |
|
|
|
<span class='id identifier rubyid_weekly_net_income'>weekly_net_income</span><span class='period'>.</span><span class='id identifier rubyid_between?'>between?</span><span class='lparen'>(</span><span class='id identifier rubyid_applicable_income_range'>applicable_income_range</span><span class='period'>.</span><span class='id identifier rubyid_soft_max'>soft_max</span><span class='comma'>,</span> <span class='id identifier rubyid_applicable_income_range'>applicable_income_range</span><span class='period'>.</span><span class='id identifier rubyid_hard_max'>hard_max</span><span class='rparen'>)</span> |
|
<span class='kw'>end</span></pre> |
|
</td> |
|
</tr> |
|
</table> |
|
</div> |
|
|
|
<div class="method_details "> |
|
<h3 class="signature " id="net_income_in_soft_min_range?-instance_method"> |
|
|
|
#<strong>net_income_in_soft_min_range?</strong> ⇒ <tt>Boolean</tt> |
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring"> |
|
<div class="discussion"> |
|
|
|
|
|
</div> |
|
</div> |
|
<div class="tags"> |
|
|
|
<p class="tag_title">Returns:</p> |
|
<ul class="return"> |
|
|
|
<li> |
|
|
|
|
|
<span class='type'>(<tt>Boolean</tt>)</span> |
|
|
|
|
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</div><table class="source_code"> |
|
<tr> |
|
<td> |
|
<pre class="lines"> |
|
|
|
|
|
24 |
|
25 |
|
26 |
|
27 |
|
28</pre> |
|
</td> |
|
<td> |
|
<pre class="code"><span class="info file"># File 'soft_validations.rb', line 24</span> |
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_net_income_in_soft_min_range?'>net_income_in_soft_min_range?</span> |
|
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_weekly_net_income'>weekly_net_income</span> <span class='op'>&&</span> <span class='id identifier rubyid_ecstat1'>ecstat1</span> <span class='op'>&&</span> <span class='id identifier rubyid_hhmemb'>hhmemb</span> |
|
|
|
<span class='id identifier rubyid_weekly_net_income'>weekly_net_income</span><span class='period'>.</span><span class='id identifier rubyid_between?'>between?</span><span class='lparen'>(</span><span class='id identifier rubyid_applicable_income_range'>applicable_income_range</span><span class='period'>.</span><span class='id identifier rubyid_hard_min'>hard_min</span><span class='comma'>,</span> <span class='id identifier rubyid_applicable_income_range'>applicable_income_range</span><span class='period'>.</span><span class='id identifier rubyid_soft_min'>soft_min</span><span class='rparen'>)</span> |
|
<span class='kw'>end</span></pre> |
|
</td> |
|
</tr> |
|
</table> |
|
</div> |
|
|
|
<div class="method_details "> |
|
<h3 class="signature " id="no_females_in_a_pregnant_household?-instance_method"> |
|
|
|
#<strong>no_females_in_a_pregnant_household?</strong> ⇒ <tt>Boolean</tt> |
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring"> |
|
<div class="discussion"> |
|
|
|
|
|
</div> |
|
</div> |
|
<div class="tags"> |
|
|
|
<p class="tag_title">Returns:</p> |
|
<ul class="return"> |
|
|
|
<li> |
|
|
|
|
|
<span class='type'>(<tt>Boolean</tt>)</span> |
|
|
|
|
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</div><table class="source_code"> |
|
<tr> |
|
<td> |
|
<pre class="lines"> |
|
|
|
|
|
70 |
|
71 |
|
72</pre> |
|
</td> |
|
<td> |
|
<pre class="code"><span class="info file"># File 'soft_validations.rb', line 70</span> |
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_no_females_in_a_pregnant_household?'>no_females_in_a_pregnant_household?</span> |
|
<span class='op'>!</span><span class='id identifier rubyid_females_in_the_household?'>females_in_the_household?</span> <span class='op'>&&</span> <span class='id identifier rubyid_all_tenants_gender_information_completed?'>all_tenants_gender_information_completed?</span> <span class='op'>&&</span> <span class='id identifier rubyid_preg_occ'>preg_occ</span> <span class='op'>==</span> <span class='int'>1</span> |
|
<span class='kw'>end</span></pre> |
|
</td> |
|
</tr> |
|
</table> |
|
</div> |
|
|
|
<div class="method_details "> |
|
<h3 class="signature " id="pscharge_in_soft_max_range?-instance_method"> |
|
|
|
#<strong>pscharge_in_soft_max_range?</strong> ⇒ <tt>Boolean</tt> |
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring"> |
|
<div class="discussion"> |
|
|
|
|
|
</div> |
|
</div> |
|
<div class="tags"> |
|
|
|
<p class="tag_title">Returns:</p> |
|
<ul class="return"> |
|
|
|
<li> |
|
|
|
|
|
<span class='type'>(<tt>Boolean</tt>)</span> |
|
|
|
|
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</div><table class="source_code"> |
|
<tr> |
|
<td> |
|
<pre class="lines"> |
|
|
|
|
|
126 |
|
127 |
|
128 |
|
129 |
|
130 |
|
131 |
|
132 |
|
133 |
|
134 |
|
135 |
|
136 |
|
137 |
|
138 |
|
139 |
|
140 |
|
141</pre> |
|
</td> |
|
<td> |
|
<pre class="code"><span class="info file"># File 'soft_validations.rb', line 126</span> |
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_pscharge_in_soft_max_range?'>pscharge_in_soft_max_range?</span> |
|
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_pscharge'>pscharge</span> <span class='op'>&&</span> <span class='id identifier rubyid_period'>period</span> <span class='op'>&&</span> <span class='id identifier rubyid_needstype'>needstype</span> <span class='op'>&&</span> <span class='id identifier rubyid_owning_organisation'>owning_organisation</span> |
|
<span class='kw'>return</span> <span class='kw'>if</span> <span class='id identifier rubyid_weekly_value'>weekly_value</span><span class='lparen'>(</span><span class='id identifier rubyid_pscharge'>pscharge</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span> |
|
|
|
<span class='id identifier rubyid_soft_max'>soft_max</span> <span class='op'>=</span> <span class='kw'>if</span> <span class='id identifier rubyid_needstype'>needstype</span> <span class='op'>==</span> <span class='int'>1</span> |
|
<span class='id identifier rubyid_owning_organisation'>owning_organisation</span><span class='period'>.</span><span class='id identifier rubyid_provider_type'>provider_type</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>LA</span><span class='tstring_end'>"</span></span> <span class='op'>?</span> <span class='int'>25</span> <span class='op'>:</span> <span class='int'>35</span> |
|
<span class='kw'>else</span> |
|
<span class='id identifier rubyid_owning_organisation'>owning_organisation</span><span class='period'>.</span><span class='id identifier rubyid_provider_type'>provider_type</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>LA</span><span class='tstring_end'>"</span></span> <span class='op'>?</span> <span class='int'>75</span> <span class='op'>:</span> <span class='int'>100</span> |
|
<span class='kw'>end</span> |
|
|
|
<span class='id identifier rubyid_provider_type'>provider_type</span> <span class='op'>=</span> <span class='id identifier rubyid_owning_organisation'>owning_organisation</span><span class='period'>.</span><span class='id identifier rubyid_provider_type_before_type_cast'>provider_type_before_type_cast</span> |
|
<span class='id identifier rubyid_hard_max'>hard_max</span> <span class='op'>=</span> <span class='const'>CHARGE_MAXIMA_PER_WEEK</span><span class='period'>.</span><span class='id identifier rubyid_dig'>dig</span><span class='lparen'>(</span><span class='symbol'>:pscharge</span><span class='comma'>,</span> <span class='const'>PROVIDER_TYPE</span><span class='lbracket'>[</span><span class='id identifier rubyid_provider_type'>provider_type</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='const'>NEEDSTYPE_VALUES</span><span class='lbracket'>[</span><span class='id identifier rubyid_needstype'>needstype</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
|
|
|
<span class='id identifier rubyid_weekly_pscharge'>weekly_pscharge</span> <span class='op'>=</span> <span class='id identifier rubyid_weekly_value'>weekly_value</span><span class='lparen'>(</span><span class='id identifier rubyid_pscharge'>pscharge</span><span class='rparen'>)</span> |
|
<span class='id identifier rubyid_weekly_pscharge'>weekly_pscharge</span> <span class='op'>></span> <span class='id identifier rubyid_soft_max'>soft_max</span> <span class='op'>&&</span> <span class='id identifier rubyid_weekly_pscharge'>weekly_pscharge</span> <span class='op'><=</span> <span class='id identifier rubyid_hard_max'>hard_max</span> |
|
<span class='kw'>end</span></pre> |
|
</td> |
|
</tr> |
|
</table> |
|
</div> |
|
|
|
<div class="method_details "> |
|
<h3 class="signature " id="reasonother_might_be_existing_category?-instance_method"> |
|
|
|
#<strong>reasonother_might_be_existing_category?</strong> ⇒ <tt>Boolean</tt> |
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring"> |
|
<div class="discussion"> |
|
|
|
|
|
</div> |
|
</div> |
|
<div class="tags"> |
|
|
|
<p class="tag_title">Returns:</p> |
|
<ul class="return"> |
|
|
|
<li> |
|
|
|
|
|
<span class='type'>(<tt>Boolean</tt>)</span> |
|
|
|
|
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</div><table class="source_code"> |
|
<tr> |
|
<td> |
|
<pre class="lines"> |
|
|
|
|
|
194 |
|
195 |
|
196</pre> |
|
</td> |
|
<td> |
|
<pre class="code"><span class="info file"># File 'soft_validations.rb', line 194</span> |
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_reasonother_might_be_existing_category?'>reasonother_might_be_existing_category?</span> |
|
<span class='const'><span class='object_link'><a href="#PHRASES_LIKELY_TO_INDICATE_EXISTING_REASON_CATEGORY_REGEX-constant" title="Validations::SoftValidations::PHRASES_LIKELY_TO_INDICATE_EXISTING_REASON_CATEGORY_REGEX (constant)">PHRASES_LIKELY_TO_INDICATE_EXISTING_REASON_CATEGORY_REGEX</a></span></span><span class='period'>.</span><span class='id identifier rubyid_match?'>match?</span><span class='lparen'>(</span><span class='id identifier rubyid_reasonother'>reasonother</span><span class='rparen'>)</span> |
|
<span class='kw'>end</span></pre> |
|
</td> |
|
</tr> |
|
</table> |
|
</div> |
|
|
|
<div class="method_details "> |
|
<h3 class="signature " id="rent_in_soft_max_range?-instance_method"> |
|
|
|
#<strong>rent_in_soft_max_range?</strong> ⇒ <tt>Boolean</tt> |
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring"> |
|
<div class="discussion"> |
|
|
|
|
|
</div> |
|
</div> |
|
<div class="tags"> |
|
|
|
<p class="tag_title">Returns:</p> |
|
<ul class="return"> |
|
|
|
<li> |
|
|
|
|
|
<span class='type'>(<tt>Boolean</tt>)</span> |
|
|
|
|
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</div><table class="source_code"> |
|
<tr> |
|
<td> |
|
<pre class="lines"> |
|
|
|
|
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56</pre> |
|
</td> |
|
<td> |
|
<pre class="code"><span class="info file"># File 'soft_validations.rb', line 42</span> |
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_rent_in_soft_max_range?'>rent_in_soft_max_range?</span> |
|
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_brent'>brent</span> <span class='op'>&&</span> <span class='id identifier rubyid_weekly_value'>weekly_value</span><span class='lparen'>(</span><span class='id identifier rubyid_brent'>brent</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='id identifier rubyid_startdate'>startdate</span> |
|
|
|
<span class='id identifier rubyid_rent_range'>rent_range</span> <span class='op'>=</span> <span class='const'>LaRentRange</span><span class='period'>.</span><span class='id identifier rubyid_find_by'>find_by</span><span class='lparen'>(</span> |
|
<span class='label'>start_year:</span> <span class='id identifier rubyid_collection_start_year'>collection_start_year</span><span class='comma'>,</span> |
|
<span class='label'>la:</span><span class='comma'>,</span> |
|
<span class='label'>beds:</span> <span class='id identifier rubyid_beds_for_la_rent_range'>beds_for_la_rent_range</span><span class='comma'>,</span> |
|
<span class='label'>lettype:</span> <span class='id identifier rubyid_get_lettype'>get_lettype</span><span class='comma'>,</span> |
|
<span class='rparen'>)</span> |
|
<span class='kw'>if</span> <span class='id identifier rubyid_beds'>beds</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span> <span class='op'>&&</span> <span class='id identifier rubyid_rent_range'>rent_range</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span> <span class='op'>&&</span> <span class='id identifier rubyid_beds'>beds</span> <span class='op'>></span> <span class='const'>LaRentRange</span><span class='op'>::</span><span class='const'>MAX_BEDS</span> |
|
<span class='id identifier rubyid_weekly_value'>weekly_value</span><span class='lparen'>(</span><span class='id identifier rubyid_brent'>brent</span><span class='rparen'>)</span> <span class='op'>></span> <span class='id identifier rubyid_rent_range'>rent_range</span><span class='period'>.</span><span class='id identifier rubyid_soft_max'>soft_max</span> |
|
<span class='kw'>elsif</span> <span class='id identifier rubyid_rent_range'>rent_range</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span> |
|
<span class='id identifier rubyid_weekly_value'>weekly_value</span><span class='lparen'>(</span><span class='id identifier rubyid_brent'>brent</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_between?'>between?</span><span class='lparen'>(</span><span class='id identifier rubyid_rent_range'>rent_range</span><span class='period'>.</span><span class='id identifier rubyid_soft_max'>soft_max</span><span class='comma'>,</span> <span class='id identifier rubyid_rent_range'>rent_range</span><span class='period'>.</span><span class='id identifier rubyid_hard_max'>hard_max</span><span class='rparen'>)</span> |
|
<span class='kw'>end</span> |
|
<span class='kw'>end</span></pre> |
|
</td> |
|
</tr> |
|
</table> |
|
</div> |
|
|
|
<div class="method_details "> |
|
<h3 class="signature " id="rent_in_soft_min_range?-instance_method"> |
|
|
|
#<strong>rent_in_soft_min_range?</strong> ⇒ <tt>Boolean</tt> |
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring"> |
|
<div class="discussion"> |
|
|
|
|
|
</div> |
|
</div> |
|
<div class="tags"> |
|
|
|
<p class="tag_title">Returns:</p> |
|
<ul class="return"> |
|
|
|
<li> |
|
|
|
|
|
<span class='type'>(<tt>Boolean</tt>)</span> |
|
|
|
|
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</div><table class="source_code"> |
|
<tr> |
|
<td> |
|
<pre class="lines"> |
|
|
|
|
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40</pre> |
|
</td> |
|
<td> |
|
<pre class="code"><span class="info file"># File 'soft_validations.rb', line 30</span> |
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_rent_in_soft_min_range?'>rent_in_soft_min_range?</span> |
|
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_brent'>brent</span> <span class='op'>&&</span> <span class='id identifier rubyid_weekly_value'>weekly_value</span><span class='lparen'>(</span><span class='id identifier rubyid_brent'>brent</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='id identifier rubyid_startdate'>startdate</span> |
|
|
|
<span class='id identifier rubyid_rent_range'>rent_range</span> <span class='op'>=</span> <span class='const'>LaRentRange</span><span class='period'>.</span><span class='id identifier rubyid_find_by'>find_by</span><span class='lparen'>(</span> |
|
<span class='label'>start_year:</span> <span class='id identifier rubyid_collection_start_year'>collection_start_year</span><span class='comma'>,</span> |
|
<span class='label'>la:</span><span class='comma'>,</span> |
|
<span class='label'>beds:</span> <span class='id identifier rubyid_beds_for_la_rent_range'>beds_for_la_rent_range</span><span class='comma'>,</span> |
|
<span class='label'>lettype:</span> <span class='id identifier rubyid_get_lettype'>get_lettype</span><span class='comma'>,</span> |
|
<span class='rparen'>)</span> |
|
<span class='id identifier rubyid_rent_range'>rent_range</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span> <span class='op'>&&</span> <span class='id identifier rubyid_weekly_value'>weekly_value</span><span class='lparen'>(</span><span class='id identifier rubyid_brent'>brent</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_between?'>between?</span><span class='lparen'>(</span><span class='id identifier rubyid_rent_range'>rent_range</span><span class='period'>.</span><span class='id identifier rubyid_hard_min'>hard_min</span><span class='comma'>,</span> <span class='id identifier rubyid_rent_range'>rent_range</span><span class='period'>.</span><span class='id identifier rubyid_soft_min'>soft_min</span><span class='rparen'>)</span> |
|
<span class='kw'>end</span></pre> |
|
</td> |
|
</tr> |
|
</table> |
|
</div> |
|
|
|
<div class="method_details "> |
|
<h3 class="signature " id="scharge_in_soft_max_range?-instance_method"> |
|
|
|
#<strong>scharge_in_soft_max_range?</strong> ⇒ <tt>Boolean</tt> |
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring"> |
|
<div class="discussion"> |
|
|
|
|
|
</div> |
|
</div> |
|
<div class="tags"> |
|
|
|
<p class="tag_title">Returns:</p> |
|
<ul class="return"> |
|
|
|
<li> |
|
|
|
|
|
<span class='type'>(<tt>Boolean</tt>)</span> |
|
|
|
|
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</div><table class="source_code"> |
|
<tr> |
|
<td> |
|
<pre class="lines"> |
|
|
|
|
|
109 |
|
110 |
|
111 |
|
112 |
|
113 |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 |
|
119 |
|
120 |
|
121 |
|
122 |
|
123 |
|
124</pre> |
|
</td> |
|
<td> |
|
<pre class="code"><span class="info file"># File 'soft_validations.rb', line 109</span> |
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_scharge_in_soft_max_range?'>scharge_in_soft_max_range?</span> |
|
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_scharge'>scharge</span> <span class='op'>&&</span> <span class='id identifier rubyid_period'>period</span> <span class='op'>&&</span> <span class='id identifier rubyid_needstype'>needstype</span> <span class='op'>&&</span> <span class='id identifier rubyid_owning_organisation'>owning_organisation</span> |
|
<span class='kw'>return</span> <span class='kw'>if</span> <span class='id identifier rubyid_weekly_value'>weekly_value</span><span class='lparen'>(</span><span class='id identifier rubyid_scharge'>scharge</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span> |
|
|
|
<span class='id identifier rubyid_soft_max'>soft_max</span> <span class='op'>=</span> <span class='kw'>if</span> <span class='id identifier rubyid_needstype'>needstype</span> <span class='op'>==</span> <span class='int'>1</span> |
|
<span class='id identifier rubyid_owning_organisation'>owning_organisation</span><span class='period'>.</span><span class='id identifier rubyid_provider_type'>provider_type</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>LA</span><span class='tstring_end'>"</span></span> <span class='op'>?</span> <span class='int'>25</span> <span class='op'>:</span> <span class='int'>35</span> |
|
<span class='kw'>else</span> |
|
<span class='id identifier rubyid_owning_organisation'>owning_organisation</span><span class='period'>.</span><span class='id identifier rubyid_provider_type'>provider_type</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>LA</span><span class='tstring_end'>"</span></span> <span class='op'>?</span> <span class='int'>100</span> <span class='op'>:</span> <span class='int'>200</span> |
|
<span class='kw'>end</span> |
|
|
|
<span class='id identifier rubyid_provider_type'>provider_type</span> <span class='op'>=</span> <span class='id identifier rubyid_owning_organisation'>owning_organisation</span><span class='period'>.</span><span class='id identifier rubyid_provider_type_before_type_cast'>provider_type_before_type_cast</span> |
|
<span class='id identifier rubyid_hard_max'>hard_max</span> <span class='op'>=</span> <span class='const'>CHARGE_MAXIMA_PER_WEEK</span><span class='period'>.</span><span class='id identifier rubyid_dig'>dig</span><span class='lparen'>(</span><span class='symbol'>:scharge</span><span class='comma'>,</span> <span class='const'>PROVIDER_TYPE</span><span class='lbracket'>[</span><span class='id identifier rubyid_provider_type'>provider_type</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='const'>NEEDSTYPE_VALUES</span><span class='lbracket'>[</span><span class='id identifier rubyid_needstype'>needstype</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
|
|
|
<span class='id identifier rubyid_weekly_scharge'>weekly_scharge</span> <span class='op'>=</span> <span class='id identifier rubyid_weekly_value'>weekly_value</span><span class='lparen'>(</span><span class='id identifier rubyid_scharge'>scharge</span><span class='rparen'>)</span> |
|
<span class='id identifier rubyid_weekly_scharge'>weekly_scharge</span> <span class='op'>></span> <span class='id identifier rubyid_soft_max'>soft_max</span> <span class='op'>&&</span> <span class='id identifier rubyid_weekly_scharge'>weekly_scharge</span> <span class='op'><=</span> <span class='id identifier rubyid_hard_max'>hard_max</span> |
|
<span class='kw'>end</span></pre> |
|
</td> |
|
</tr> |
|
</table> |
|
</div> |
|
|
|
<div class="method_details "> |
|
<h3 class="signature " id="supcharg_in_soft_max_range?-instance_method"> |
|
|
|
#<strong>supcharg_in_soft_max_range?</strong> ⇒ <tt>Boolean</tt> |
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring"> |
|
<div class="discussion"> |
|
|
|
|
|
</div> |
|
</div> |
|
<div class="tags"> |
|
|
|
<p class="tag_title">Returns:</p> |
|
<ul class="return"> |
|
|
|
<li> |
|
|
|
|
|
<span class='type'>(<tt>Boolean</tt>)</span> |
|
|
|
|
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</div><table class="source_code"> |
|
<tr> |
|
<td> |
|
<pre class="lines"> |
|
|
|
|
|
143 |
|
144 |
|
145 |
|
146 |
|
147 |
|
148 |
|
149 |
|
150 |
|
151 |
|
152 |
|
153 |
|
154 |
|
155 |
|
156 |
|
157 |
|
158</pre> |
|
</td> |
|
<td> |
|
<pre class="code"><span class="info file"># File 'soft_validations.rb', line 143</span> |
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_supcharg_in_soft_max_range?'>supcharg_in_soft_max_range?</span> |
|
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_supcharg'>supcharg</span> <span class='op'>&&</span> <span class='id identifier rubyid_period'>period</span> <span class='op'>&&</span> <span class='id identifier rubyid_needstype'>needstype</span> <span class='op'>&&</span> <span class='id identifier rubyid_owning_organisation'>owning_organisation</span> |
|
<span class='kw'>return</span> <span class='kw'>if</span> <span class='id identifier rubyid_weekly_value'>weekly_value</span><span class='lparen'>(</span><span class='id identifier rubyid_supcharg'>supcharg</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span> |
|
|
|
<span class='id identifier rubyid_soft_max'>soft_max</span> <span class='op'>=</span> <span class='kw'>if</span> <span class='id identifier rubyid_needstype'>needstype</span> <span class='op'>==</span> <span class='int'>1</span> |
|
<span class='id identifier rubyid_owning_organisation'>owning_organisation</span><span class='period'>.</span><span class='id identifier rubyid_provider_type'>provider_type</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>LA</span><span class='tstring_end'>"</span></span> <span class='op'>?</span> <span class='int'>25</span> <span class='op'>:</span> <span class='int'>35</span> |
|
<span class='kw'>else</span> |
|
<span class='id identifier rubyid_owning_organisation'>owning_organisation</span><span class='period'>.</span><span class='id identifier rubyid_provider_type'>provider_type</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>LA</span><span class='tstring_end'>"</span></span> <span class='op'>?</span> <span class='int'>75</span> <span class='op'>:</span> <span class='int'>85</span> |
|
<span class='kw'>end</span> |
|
|
|
<span class='id identifier rubyid_provider_type'>provider_type</span> <span class='op'>=</span> <span class='id identifier rubyid_owning_organisation'>owning_organisation</span><span class='period'>.</span><span class='id identifier rubyid_provider_type_before_type_cast'>provider_type_before_type_cast</span> |
|
<span class='id identifier rubyid_hard_max'>hard_max</span> <span class='op'>=</span> <span class='const'>CHARGE_MAXIMA_PER_WEEK</span><span class='period'>.</span><span class='id identifier rubyid_dig'>dig</span><span class='lparen'>(</span><span class='symbol'>:supcharg</span><span class='comma'>,</span> <span class='const'>PROVIDER_TYPE</span><span class='lbracket'>[</span><span class='id identifier rubyid_provider_type'>provider_type</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='const'>NEEDSTYPE_VALUES</span><span class='lbracket'>[</span><span class='id identifier rubyid_needstype'>needstype</span><span class='rbracket'>]</span><span class='rparen'>)</span> |
|
|
|
<span class='id identifier rubyid_weekly_supcharg'>weekly_supcharg</span> <span class='op'>=</span> <span class='id identifier rubyid_weekly_value'>weekly_value</span><span class='lparen'>(</span><span class='id identifier rubyid_supcharg'>supcharg</span><span class='rparen'>)</span> |
|
<span class='id identifier rubyid_weekly_supcharg'>weekly_supcharg</span> <span class='op'>></span> <span class='id identifier rubyid_soft_max'>soft_max</span> <span class='op'>&&</span> <span class='id identifier rubyid_weekly_supcharg'>weekly_supcharg</span> <span class='op'><=</span> <span class='id identifier rubyid_hard_max'>hard_max</span> |
|
<span class='kw'>end</span></pre> |
|
</td> |
|
</tr> |
|
</table> |
|
</div> |
|
|
|
<div class="method_details "> |
|
<h3 class="signature " id="voiddate_in_soft_range?-instance_method"> |
|
|
|
#<strong>voiddate_in_soft_range?</strong> ⇒ <tt>Boolean</tt> |
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring"> |
|
<div class="discussion"> |
|
|
|
|
|
</div> |
|
</div> |
|
<div class="tags"> |
|
|
|
<p class="tag_title">Returns:</p> |
|
<ul class="return"> |
|
|
|
<li> |
|
|
|
|
|
<span class='type'>(<tt>Boolean</tt>)</span> |
|
|
|
|
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</div><table class="source_code"> |
|
<tr> |
|
<td> |
|
<pre class="lines"> |
|
|
|
|
|
101 |
|
102 |
|
103</pre> |
|
</td> |
|
<td> |
|
<pre class="code"><span class="info file"># File 'soft_validations.rb', line 101</span> |
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_voiddate_in_soft_range?'>voiddate_in_soft_range?</span> |
|
<span class='id identifier rubyid_voiddate'>voiddate</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span> <span class='op'>&&</span> <span class='id identifier rubyid_startdate'>startdate</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span> <span class='op'>&&</span> <span class='id identifier rubyid_voiddate'>voiddate</span><span class='period'>.</span><span class='id identifier rubyid_between?'>between?</span><span class='lparen'>(</span><span class='id identifier rubyid_startdate'>startdate</span><span class='period'>.</span><span class='id identifier rubyid_to_date'>to_date</span> <span class='op'>-</span> <span class='const'><span class='object_link'><a href="#TEN_YEARS_IN_DAYS-constant" title="Validations::SoftValidations::TEN_YEARS_IN_DAYS (constant)">TEN_YEARS_IN_DAYS</a></span></span><span class='comma'>,</span> <span class='id identifier rubyid_startdate'>startdate</span><span class='period'>.</span><span class='id identifier rubyid_to_date'>to_date</span> <span class='op'>-</span> <span class='const'><span class='object_link'><a href="#TWO_YEARS_IN_DAYS-constant" title="Validations::SoftValidations::TWO_YEARS_IN_DAYS (constant)">TWO_YEARS_IN_DAYS</a></span></span><span class='rparen'>)</span> |
|
<span class='kw'>end</span></pre> |
|
</td> |
|
</tr> |
|
</table> |
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div id="footer"> |
|
Generated on Thu Apr 18 11:36:48 2024 by |
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> |
|
0.9.36 (ruby-3.1.4). |
|
</div> |
|
|
|
</div> |
|
</body> |
|
</html> |