class Plugin::Settings::Record

Attributes

name[R]

Public Class Methods

new(name, proc, plugin, ancestor_advice: nil) click to toggle source
# File core/plugin/settings/menu.rb, line 48
def initialize(name, proc, plugin, ancestor_advice: nil)
  @name = name
  @proc = proc
  @plugin = plugin
  @ancestor_advice = ancestor_advice
end

Public Instance Methods

children() click to toggle source
# File core/plugin/settings/menu.rb, line 61
def children
  @ancestor_advice ||= Phantom.new(@plugin, &@proc).detected
end
inspect() click to toggle source
# File core/plugin/settings/menu.rb, line 65
def inspect
  "#<#{self.class}: #{name.inspect} plugin: #{plugin.inspect} #{proc.inspect}>"
end
widget() click to toggle source
# File core/plugin/settings/menu.rb, line 55
def widget
  box = Plugin::Settings::SettingDSL.new(Plugin.instance(@plugin))
  box.instance_eval(&@proc)
  box
end