Class: Sequencescape::Api::Associations::BelongsTo::CommonBehaviour::LoadHandler
- Inherits:
-
Object
- Object
- Sequencescape::Api::Associations::BelongsTo::CommonBehaviour::LoadHandler
- Includes:
- BasicErrorHandling
- Defined in:
- lib/sequencescape-api/associations/belongs_to.rb
Instance Method Summary collapse
-
#initialize(owner) ⇒ LoadHandler
constructor
A new instance of LoadHandler.
- #success(json) ⇒ Object
Methods included from BasicErrorHandling
#missing, #redirection, #unauthenticated
Constructor Details
#initialize(owner) ⇒ LoadHandler
Returns a new instance of LoadHandler.
49 50 51 |
# File 'lib/sequencescape-api/associations/belongs_to.rb', line 49 def initialize(owner) @owner = owner end |
Instance Method Details
#success(json) ⇒ Object
62 63 64 |
# File 'lib/sequencescape-api/associations/belongs_to.rb', line 62 def success(json) new(json, true).tap { loaded = true } end |