Module: Lavin::UserConfig

Defined in:
lib/lavin/user_config.rb

Defined Under Namespace

Modules: ClassMethods

Constant Summary collapse

DEFAULT =
{
  enabled: true,
  user_count: 1,
  iterations: 1,
  base_url: nil
}.freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



53
54
55
# File 'lib/lavin/user_config.rb', line 53

def config
  @config
end

Class Method Details

.included(base) ⇒ Object



49
50
51
# File 'lib/lavin/user_config.rb', line 49

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

Instance Method Details

#descriptionObject



64
65
66
# File 'lib/lavin/user_config.rb', line 64

def description
  self.class.description
end

#initialize(**kwargs) ⇒ Object



55
56
57
58
# File 'lib/lavin/user_config.rb', line 55

def initialize(**kwargs)
  @config = self.class.config
  super(**kwargs)
end

#nameObject



60
61
62
# File 'lib/lavin/user_config.rb', line 60

def name
  self.class.name
end