Class: Settingify::Builders::Group

Inherits:
Struct
  • Object
show all
Includes:
SettingsPreparable
Defined in:
lib/settingify/builders/group.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from SettingsPreparable

#prepare_settings

Methods included from DSL

#group

Instance Attribute Details

#blockObject

Returns the value of attribute block

Returns:

  • (Object)

    the current value of block



3
4
5
# File 'lib/settingify/builders/group.rb', line 3

def block
  @block
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



3
4
5
# File 'lib/settingify/builders/group.rb', line 3

def name
  @name
end

Class Method Details

.call(*opts, &block) ⇒ Object



6
7
8
# File 'lib/settingify/builders/group.rb', line 6

def self.call(*opts, &block)
  new(*opts).call(&block)
end

Instance Method Details

#call(&block) ⇒ Object



10
11
12
# File 'lib/settingify/builders/group.rb', line 10

def call(&block)
  self.prepare_settings(&block)
end

#setting(name, type: String, default: '') ⇒ Object



14
15
16
17
# File 'lib/settingify/builders/group.rb', line 14

def setting(name, type: String, default: '')
  attach_to_group(name)
  super
end