class Crunchbase::FundRaise
Attributes
metadata[RW]
Public Class Methods
find(uuid)
click to toggle source
# File lib/crunchbase/fund_raise.rb, line 19 def self.find(uuid) response = Faraday.get("#{Crunchbase.config.host}/#{Crunchbase.config.api_version_prefix}/fund-raise/#{uuid}", user_key: Crunchbase.config.user_key) raise "Error" if response.status != 200 raw = Hashie::Mash.new(JSON.parse(response.body)) new(raw.data, raw.metadata) rescue nil end
new(data, meta)
click to toggle source
# File lib/crunchbase/fund_raise.rb, line 10 def initialize(data, meta) @mash = data self.metadata = meta end
Public Instance Methods
method_missing(method_sym, *arguments, &block)
click to toggle source
# File lib/crunchbase/fund_raise.rb, line 15 def method_missing(method_sym, *arguments, &block) @mash.send(method_sym, *arguments) end