Module: Adminterface::Extensions::Inputs::Base::Pluginish

Included in:
Adminterface::Extensions::Inputs::Base
Defined in:
lib/adminterface/extensions/inputs/base/pluginish.rb

Defined Under Namespace

Classes: Config

Instance Method Summary collapse

Instance Method Details

#plugin?(name) ⇒ Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/adminterface/extensions/inputs/base/pluginish.rb', line 39

def plugin?(name)
  !!plugins_options.dig(:data, "aa-#{name}".to_sym)
end

#plugins_configsObject



31
32
33
# File 'lib/adminterface/extensions/inputs/base/pluginish.rb', line 31

def plugins_configs
  plugins&.map { |plugin| Config.new(plugin, options).attributes } || []
end

#plugins_optionsObject



35
36
37
# File 'lib/adminterface/extensions/inputs/base/pluginish.rb', line 35

def plugins_options
  {data: plugins_configs.inject(&:merge)}
end