Class: PartyResource::Buildable::Builder
- Inherits:
-
Object
- Object
- PartyResource::Buildable::Builder
- Defined in:
- lib/party_resource/buildable.rb
Instance Method Summary collapse
- #call(raw_result, context, included) ⇒ Object
-
#initialize(build_options) ⇒ Builder
constructor
A new instance of Builder.
Constructor Details
#initialize(build_options) ⇒ Builder
Returns a new instance of Builder.
9 10 11 |
# File 'lib/party_resource/buildable.rb', line 9 def initialize() @build_options = end |
Instance Method Details
#call(raw_result, context, included) ⇒ Object
13 14 15 16 17 |
# File 'lib/party_resource/buildable.rb', line 13 def call(raw_result, context, included) return nil if raw_result.nil? return raw_result.map{ |value| build_result(value, context, included) } if map_result?(raw_result) build_result(raw_result, context, included) end |