Class: DVLA::Atlas::Artefacts

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/dvla/atlas/artefacts.rb

Instance Method Summary collapse

Instance Method Details

#define_fields(*vargs, **kwargs) ⇒ Object



11
12
13
14
15
16
17
18
19
20
# File 'lib/dvla/atlas/artefacts.rb', line 11

def define_fields(*vargs, **kwargs)
  vargs.each do |attr|
    initialise_fields(attr)
  end

  kwargs.each_pair do |key, value|
    initialise_fields(key)
    send(:"#{key}=", value) # As an initial value has been passed for this field, we want to set it using the newly defined setter
  end
end