Class: Rapid::Baps::Responses::Handlers::Loader

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/ury_rapid/baps/responses/handlers/loader.rb

Overview

A method object for updating the Rapid model with BAPS track loads

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent, response, id, urls, origin) ⇒ Loader

Returns a new instance of Loader


89
90
91
92
93
94
95
# File 'lib/ury_rapid/baps/responses/handlers/loader.rb', line 89

def initialize(parent, response, id, urls, origin)
  @parent = parent
  @response = response
  @id = id
  @urls = urls
  @origin = origin
end

Class Method Details

.load(*args) ⇒ Object


85
86
87
# File 'lib/ury_rapid/baps/responses/handlers/loader.rb', line 85

def self.load(*args)
  new(*args).run
end

.targets?Boolean

Stop handler loaders from trying to load handlers from this class.

Returns:

  • (Boolean)

81
82
83
# File 'lib/ury_rapid/baps/responses/handlers/loader.rb', line 81

def self.targets?
  false
end

Instance Method Details

#runObject


97
98
99
# File 'lib/ury_rapid/baps/responses/handlers/loader.rb', line 97

def run
  load_item(*response_to_item_and_load_state)
end