module Ez::Settings::RequestDispatcher

Public Instance Methods

group() click to toggle source
# File lib/ez/settings/request_dispatcher.rb, line 17
def group
  return unless interface

  # TODO: add raise exception if nil
  interface.groups.find { |g| g.name == params[:group].to_sym }
end
interface() click to toggle source

should implement :params

# File lib/ez/settings/request_dispatcher.rb, line 8
def interface
  return unless params[:ez_settings_interface]

  # TODO: add raise exception in nil
  Ez::Registry.data(:settings_interfaces).find do |interface|
    interface.name == params[:ez_settings_interface].to_sym
  end
end