Sha256: 05be4cbc47666c5fdbde3492fa02fb789543efdd2eac080cf469145af854f414

Contents?: true

Size: 263 Bytes

Versions: 65

Compression:

Stored size: 263 Bytes

Contents

module Reactor::OptionallySubclassable
  extend ActiveSupport::Concern

  module ClassMethods
    def find_sti_class(type_name)
      begin
        ActiveSupport::Dependencies.constantize(type_name)
      rescue NameError
        self
      end
    end
  end
end

Version data entries

65 entries across 65 versions & 1 rubygems

Version Path
reactor-0.1.3 lib/reactor/models/concerns/optionally_subclassable.rb
reactor-0.1.2 lib/reactor/models/concerns/optionally_subclassable.rb
reactor-0.1.1 lib/reactor/models/concerns/optionally_subclassable.rb
reactor-0.1.0 lib/reactor/models/concerns/optionally_subclassable.rb
reactor-0.0.1 lib/reactor/models/concerns/optionally_subclassable.rb