Sha256: a31aef56a0ef8e256e23736a7379e5336890f211448f7e9d1596d45e85962ee4
Contents?: true
Size: 604 Bytes
Versions: 14
Compression:
Stored size: 604 Bytes
Contents
class PeakFlowUtils::HandlerHelper delegate :translations, to: :instance def self.find(id) PeakFlowUtils::HandlersFinderService.execute!.each do |handler| return handler if handler.id == id.to_s end raise ActiveRecord::RecordNotFound, "Handlers not found: '#{id}'." end def initialize(data) @data = data end def id @data.fetch(:id) end def to_param id end def name @data.fetch(:name) end def const PeakFlowUtils.const_get(@data.fetch(:const_name)) end def instance const.new end def groups const.new.groups end end
Version data entries
14 entries across 14 versions & 1 rubygems