Class: Orghunter::Charity

Inherits:
Object
  • Object
show all
Defined in:
lib/orghunter/charity.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#categoryObject (readonly)

Returns the value of attribute category.



3
4
5
# File 'lib/orghunter/charity.rb', line 3

def category
  @category
end

#cityObject (readonly)

Returns the value of attribute city.



3
4
5
# File 'lib/orghunter/charity.rb', line 3

def city
  @city
end

#donation_URLObject (readonly)

Returns the value of attribute donation_URL.



3
4
5
# File 'lib/orghunter/charity.rb', line 3

def donation_URL
  @donation_URL
end

#einObject (readonly)

Returns the value of attribute ein.



3
4
5
# File 'lib/orghunter/charity.rb', line 3

def ein
  @ein
end

#missionObject (readonly)

Returns the value of attribute mission.



3
4
5
# File 'lib/orghunter/charity.rb', line 3

def mission
  @mission
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/orghunter/charity.rb', line 3

def name
  @name
end

#org_hunter_URLObject (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_scoreObject (readonly)

Returns the value of attribute search_score.



3
4
5
# File 'lib/orghunter/charity.rb', line 3

def search_score
  @search_score
end

#stateObject (readonly)

Returns the value of attribute state.



3
4
5
# File 'lib/orghunter/charity.rb', line 3

def state
  @state
end

#statusObject (readonly)

Returns the value of attribute status.



3
4
5
# File 'lib/orghunter/charity.rb', line 3

def status
  @status
end

#websiteObject (readonly)

Returns the value of attribute website.



3
4
5
# File 'lib/orghunter/charity.rb', line 3

def website
  @website
end

#zip_codeObject (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

Returns:

  • (Boolean)


31
32
33
# File 'lib/orghunter/charity.rb', line 31

def accepting_donations?
  @accepting_donations == 1
end

#deductable?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/orghunter/charity.rb', line 23

def deductable?
  @deductability == 1
end

#eligible?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/orghunter/charity.rb', line 27

def eligible?
  @eligible_cd == 1
end