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.4.5 lib/reactor/models/concerns/optionally_subclassable.rb
reactor-0.4.4 lib/reactor/models/concerns/optionally_subclassable.rb
reactor-0.4.3 lib/reactor/models/concerns/optionally_subclassable.rb
reactor-0.4.2 lib/reactor/models/concerns/optionally_subclassable.rb
reactor-0.4.0 lib/reactor/models/concerns/optionally_subclassable.rb
reactor-0.3.2 lib/reactor/models/concerns/optionally_subclassable.rb
reactor-0.3.1 lib/reactor/models/concerns/optionally_subclassable.rb
reactor-0.3.0 lib/reactor/models/concerns/optionally_subclassable.rb
reactor-0.2.10 lib/reactor/models/concerns/optionally_subclassable.rb
reactor-0.2.9 lib/reactor/models/concerns/optionally_subclassable.rb
reactor-0.2.8 lib/reactor/models/concerns/optionally_subclassable.rb
reactor-0.2.7 lib/reactor/models/concerns/optionally_subclassable.rb
reactor-0.2.6 lib/reactor/models/concerns/optionally_subclassable.rb
reactor-0.2.5 lib/reactor/models/concerns/optionally_subclassable.rb
reactor-0.2.4 lib/reactor/models/concerns/optionally_subclassable.rb
reactor-0.2.3 lib/reactor/models/concerns/optionally_subclassable.rb
reactor-0.2.2 lib/reactor/models/concerns/optionally_subclassable.rb
reactor-0.2.1 lib/reactor/models/concerns/optionally_subclassable.rb
reactor-0.2.0 lib/reactor/models/concerns/optionally_subclassable.rb
reactor-0.1.4 lib/reactor/models/concerns/optionally_subclassable.rb