Class: FellowshipOne::Fund
Instance Attribute Summary
Attributes inherited from ApiObject
#error_messages, #marked_for_destruction
Class Method Summary collapse
-
.load_by_id(fund_id) ⇒ Object
Load the fund by the specified ID.
Instance Method Summary collapse
-
#initialize(reader = nil) ⇒ Fund
constructor
Constructor.
Methods inherited from ApiObject
__f1_attributes, #_default_result_key, #_field_map, f1_attr_accessor, #initialize_from_json_object, #save, #set_attributes, #to_attributes
Constructor Details
#initialize(reader = nil) ⇒ Fund
Constructor.
30 31 32 33 34 35 36 |
# File 'lib/api/fund.rb', line 30 def initialize(reader = nil) if reader.is_a?(FundReader) initialize_from_json_object(reader.load_feed['fund']) elsif reader.is_a?(Hash) initialize_from_json_object(reader) end end |
Class Method Details
.load_by_id(fund_id) ⇒ Object
Load the fund by the specified ID.
Returns a new Fund object.
22 23 24 25 |
# File 'lib/api/fund.rb', line 22 def self.load_by_id(fund_id) reader = FundReader.new(fund_id) self.new(reader) end |