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::Case
with two parameters, theissue
at hand and an array offacts
about the case. - You ask the
Legality::Case
for a#rule
on the case. This will return aLegality::Rule
object. - You can then ask the
Legality::Rule
whether any given conductis_legal?
oris_illegal?
. If you just want the token summary of the rule, you can ask theLegality::Rule
for the#ruling
and 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_consent
The 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.