Class: ShelbyArena::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
Constructor Details
#initialize(reader = nil) ⇒ Fund
Constructor.
27 28 29 30 31 32 33 |
# File 'lib/api/fund.rb', line 27 def initialize(reader = nil) if reader.is_a?(FundReader) initialize_from_json_object(reader.load_data['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.
19 20 21 22 |
# File 'lib/api/fund.rb', line 19 def self.load_by_id(fund_id) reader = FundReader.new(fund_id) self.new(reader) end |