Class: ActiveAdmin::SettingsNode

Inherits:
Object
  • Object
show all
Defined in:
lib/active_admin/settings_node.rb

Direct Known Subclasses

ApplicationSettings, DynamicSettingsNode

Class Method Summary collapse

Class Method Details

.build(superclass = self) ⇒ Object

Returns anonymous class with same accessors as the superclass.

Returns:

  • anonymous class with same accessors as the superclass.



10
11
12
# File 'lib/active_admin/settings_node.rb', line 10

def build(superclass = self)
  Class.new(superclass)
end

.register(name, value) ⇒ Object



14
15
16
17
# File 'lib/active_admin/settings_node.rb', line 14

def register(name, value)
  class_attribute name
  send :"#{name}=", value
end