A gem to determine whether given actions are legal or illegal. It can easily be extended to cover new situations and new laws as needed, since it is entirely possible that LeadSimple will be subject to other laws and regulations.
- You create a
Legality::Casewith two parameters, theissueat hand and an array offactsabout the case. - You ask the
Legality::Casefor a#ruleon the case. This will return aLegality::Ruleobject. - You can then ask the
Legality::Rulewhether any given conductis_legal?oris_illegal?. If you just want the token summary of the rule, you can ask theLegality::Rulefor the#rulingand get back asymbol.
The gem supports call recording legislation in the United States.
# Determine whether we can legally record a phone call between these two
# phone numbers.
rule = Legality::Case.new(:call_recording, ["3603334444", "3335556666"]).rule
rule.ruling # => :all_party_consent
# Or, shorthand
rule = Legality::Case.new(:call_recording, ["3603334444", "3335556666"]).ruling
# => :all_party_consentThe results returned from this gem are not a substitute for legal advice. Neither LeadSimple nor the author, Daniel Berkompas, will be liable for any violation of law resulting from trusting this gem.