Class: Orghunter::Charity
- Inherits:
-
Object
- Object
- Orghunter::Charity
- Defined in:
- lib/orghunter/charity.rb
Instance Attribute Summary collapse
-
#category ⇒ Object
readonly
Returns the value of attribute category.
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#donation_URL ⇒ Object
readonly
Returns the value of attribute donation_URL.
-
#ein ⇒ Object
readonly
Returns the value of attribute ein.
-
#mission ⇒ Object
readonly
Returns the value of attribute mission.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#org_hunter_URL ⇒ Object
readonly
Returns the value of attribute org_hunter_URL.
-
#search_score ⇒ Object
readonly
Returns the value of attribute search_score.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#website ⇒ Object
readonly
Returns the value of attribute website.
-
#zip_code ⇒ Object
readonly
Returns the value of attribute zip_code.
Instance Method Summary collapse
- #accepting_donations? ⇒ Boolean
- #deductable? ⇒ Boolean
- #eligible? ⇒ Boolean
-
#initialize(args) ⇒ Charity
constructor
A new instance of Charity.
Constructor Details
#initialize(args) ⇒ Charity
Returns a new instance of Charity.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/orghunter/charity.rb', line 5 def initialize(args) @name = args["charityName"] @category = args["category"] @org_hunter_URL = args["url"] @donation_URL = args["donationUrl"] @eligible_cd = args["eligibleCd"] @city = args["city"] @state = args["state"] @zip_code = args["zipCode"] @deductability = args["deductibilityCd"] @status = args["statusCd"] @search_score = args["score"] @website = args["website"] @mission = args["missionStatement"] @accepting_donations = args["acceptingDonations"] @ein = args["ein"] end |
Instance Attribute Details
#category ⇒ Object (readonly)
Returns the value of attribute category.
3 4 5 |
# File 'lib/orghunter/charity.rb', line 3 def category @category end |
#city ⇒ Object (readonly)
Returns the value of attribute city.
3 4 5 |
# File 'lib/orghunter/charity.rb', line 3 def city @city end |
#donation_URL ⇒ Object (readonly)
Returns the value of attribute donation_URL.
3 4 5 |
# File 'lib/orghunter/charity.rb', line 3 def donation_URL @donation_URL end |
#ein ⇒ Object (readonly)
Returns the value of attribute ein.
3 4 5 |
# File 'lib/orghunter/charity.rb', line 3 def ein @ein end |
#mission ⇒ Object (readonly)
Returns the value of attribute mission.
3 4 5 |
# File 'lib/orghunter/charity.rb', line 3 def mission @mission end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/orghunter/charity.rb', line 3 def name @name end |
#org_hunter_URL ⇒ Object (readonly)
Returns the value of attribute org_hunter_URL.
3 4 5 |
# File 'lib/orghunter/charity.rb', line 3 def org_hunter_URL @org_hunter_URL end |
#search_score ⇒ Object (readonly)
Returns the value of attribute search_score.
3 4 5 |
# File 'lib/orghunter/charity.rb', line 3 def search_score @search_score end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
3 4 5 |
# File 'lib/orghunter/charity.rb', line 3 def state @state end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
3 4 5 |
# File 'lib/orghunter/charity.rb', line 3 def status @status end |
#website ⇒ Object (readonly)
Returns the value of attribute website.
3 4 5 |
# File 'lib/orghunter/charity.rb', line 3 def website @website end |
#zip_code ⇒ Object (readonly)
Returns the value of attribute zip_code.
3 4 5 |
# File 'lib/orghunter/charity.rb', line 3 def zip_code @zip_code end |
Instance Method Details
#accepting_donations? ⇒ Boolean
31 32 33 |
# File 'lib/orghunter/charity.rb', line 31 def accepting_donations? @accepting_donations == 1 end |
#deductable? ⇒ Boolean
23 24 25 |
# File 'lib/orghunter/charity.rb', line 23 def deductable? @deductability == 1 end |
#eligible? ⇒ Boolean
27 28 29 |
# File 'lib/orghunter/charity.rb', line 27 def eligible? @eligible_cd == 1 end |