Method: ProcessOut::ExportLayout#prefill

Defined in:
lib/processout/export_layout.rb

#prefill(data) ⇒ Object

Prefills the object with the data passed as parameters Params:

data

Hash of data



153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# File 'lib/processout/export_layout.rb', line 153

def prefill(data)
  if data.nil?
    return self
  end
  self.id = data.fetch(:id, self.id)
  self.project = data.fetch(:project, self.project)
  self.project_id = data.fetch(:project_id, self.project_id)
  self.created_at = data.fetch(:created_at, self.created_at)
  self.name = data.fetch(:name, self.name)
  self.type = data.fetch(:type, self.type)
  self.is_default = data.fetch(:is_default, self.is_default)
  self.configuration = data.fetch(:configuration, self.configuration)
  
  self
end