Module: RgGen::Core::Utility::AttributeSetter

Defined in:
lib/rggen/core/utility/attribute_setter.rb

Defined Under Namespace

Modules: Extension

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(class_or_module) ⇒ Object



34
35
36
# File 'lib/rggen/core/utility/attribute_setter.rb', line 34

def self.included(class_or_module)
  class_or_module.extend(Extension)
end

Instance Method Details

#apply_attributes(**attributes) ⇒ Object



38
39
40
41
42
# File 'lib/rggen/core/utility/attribute_setter.rb', line 38

def apply_attributes(**attributes)
  attributes.each do |name, value|
    __send__(name, value) if self.class.attributes.include?(name)
  end
end