Flowdock
method

initializer

Importance_0
v3.2.8 - Show latest stable - 0 notes - Class: Rails::Initializable::ClassMethods
initializer(name, opts = {}, &blk) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File railties/lib/rails/initializable.rb, line 82
      def initializer(name, opts = {}, &blk)
        raise ArgumentError, "A block must be passed when defining an initializer" unless blk
        opts[:after] ||= initializers.last.name unless initializers.empty? || initializers.find { |i| i.name == opts[:before] }
        initializers << Initializer.new(name, nil, opts, &blk)
      end
Register or log in to add new notes.