Module: SecurityGuard::Concerns::Initializable

Included in:
SecurityGuard::CountryIps, Deduplication, Sequences
Defined in:
lib/security_guard/concerns/initializable.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



4
5
6
# File 'lib/security_guard/concerns/initializable.rb', line 4

def self.included(klass)
  klass.extend ClassMethods
end

Instance Method Details

#initializable_attrs(attributes = nil) ⇒ Object



8
9
10
11
12
# File 'lib/security_guard/concerns/initializable.rb', line 8

def initializable_attrs(attributes = nil)
  attributes.each do |name, value|
    self.send "#{name}=", value
  end if attributes
end