class ChurchCommunityBuilder::Fund
Attributes
funds[R]
response[R]
Public Class Methods
new(response)
click to toggle source
# File lib/church_community_builder/response/fund.rb, line 7 def initialize(response) @response = response['ccb_api']['response'] @funds = @response['transaction_detail_types']['transaction_detail_type'] end
Public Instance Methods
parse()
click to toggle source
# File lib/church_community_builder/response/fund.rb, line 12 def parse @funds.map do |fund| OpenStruct.new( id: fund['id'], name: fund['name'] ) end end