Skip to content

Instantly share code, notes, and snippets.

@rcackerman
Created November 30, 2015 18:56
Show Gist options
  • Save rcackerman/128f25841a6c277213b3 to your computer and use it in GitHub Desktop.
Save rcackerman/128f25841a6c277213b3 to your computer and use it in GitHub Desktop.
prawn
class ReportPdf
include Prawn::View
def initialize(notice)
@notice = notice
noc_header
notice_of_claim
verification_header
verification_body
end
def noc_header
end
def notice_of_claim
text "TO: THE COMPTROLLER OF THE CITY OF NEW YORK CITY
PLEASE TAKE NOTICE that #{@notice.name} intends to file claims claims will be for damages against the City of New York, #{generate_officers}
In support of their claims, Claimant states as follows:
1. The time, place, and manner in which the claims arose are as follows:
On [DATE] at [Time] at [Location] [Claimant was subjected to [False arrest and false imprisonment] by NYPD officers [John Doe / Officers name].] [Claimant suffered a battery and was subjected to excessive force by being [type of battery] at the hands of NYPD officers [John Doe / Officer name].] [Claimant was subjected to an assault by NYPD officers [John Doe / Officers Name].] [Claimant was subjected to an illegal search of their property when NYPD officers [John Doe / Name of Officers] searched their [property that was searched].] [Claimant’s property, to wit [type of property], was [seized or damaged or both seized and damaged] by NYPD officers [John Doe / Name of officers]. As a result, claimant was subjected to [Any property claims that apply].]
5. Claim for personal injuries, [physical], [emotional, mental, and psychological injury, pain and suffering], [actual medical expenses], [embarrassment and humiliation] sustained by claimant as a result of intentional, reckless, and/or negligent behavior on behalf of agents, servants or employees of New York City, the extent of which has not yet been fully determined.
6. Claimant claims [medical bills, doctor bills], [lost earnings], [damages to personal property], [damages for pain and suffering] and punitive damages, and diverse general and special damages, the exact extent of which has not yet been determined. Claimant also claims legal expenses..
7. Please take notice that [FIRST NAME] [LAST NAME] presents this claim for adjustment and payment and notify Respondents that, unless this claim is adjusted and paid within the time provided by law, they intend to commence an action against Respondents.
Dated: New York, NY
[DATE OF FILING]"
end
def verification_header
end
def verification_body
end
def generate_officers
officers = @notice.officers
if officers.length > 0:
officers = officers.map { |o| "Officer #{o.name}" }
officer_text = officers.join(", ")
else
officer_text = "John Doe"
end
officer_text
end
def generate_incident_details
details = []
case incident_details
when @notice.officer_arrested_me == true
details << "Claimant was subjected to false arrest and false imprisonment by NYPD officers [John Doe / Officers name]."
when @notice.officer_injured_me == true
details << "Claimant suffered a battery and was subjected to excessive force by being [type of battery] at the hands of NYPD officers [John Doe / Officer name]."
when @notice.officer_threatened_me == true
details << "[Claimant was subjected to an assault by NYPD officers [John Doe / Officers Name].]"
when @notice.officer_searched == true
details << "[Claimant was subjected to an illegal search of their property when NYPD officers [John Doe / Name of Officers] searched their [property that was searched].]"
when @notice.officer_took_property == true || @notice.officer_damaged_property == true || @notice.officer_destroyed_property == true
details << "[Claimant’s property, to wit [type of property], was [seized or damaged or both seized and damaged] by NYPD officers [John Doe / Name of officers]. As a result, claimant was subjected to [Any property claims that apply].]"
end
details
end
def generate_injury_details
if @notice.injury_details.any?
end
end
def generate_damages
end
end
@rcackerman
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment