class Fellowshipone::Fund
Public Class Methods
format(res)
click to toggle source
# File lib/fellowshipone/responses/fund.rb, line 3 def self.format(res) response = res['funds']['fund'] if response.is_a?(Array) response.map{|fund| format_fund(fund) } else format_fund(response) end end
format_fund(fund)
click to toggle source
# File lib/fellowshipone/responses/fund.rb, line 12 def self.format_fund(fund) OpenStruct.new( id: fund["@id"], name: fund["name"], ) end