Sha256: ebeb4cfa63188c67b2bb58d1149b2d29f72c8d039801362f21cd96ac56f1c073

Contents?: true

Size: 345 Bytes

Versions: 16

Compression:

Stored size: 345 Bytes

Contents

require 'generators/data_mapper'

module DataMapper
  module Generators
    class ObserverGenerator < Base
      check_class_collision :suffix => "Observer"

      def create_observer_file
        template 'observer.rb', File.join('app/models', class_path, "#{file_name}_observer.rb")
      end

      hook_for :test_framework
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
rails3-generators-1.0.0 lib/generators/data_mapper/observer/observer_generator.rb
rails3-generators-0.17.6 lib/generators/data_mapper/observer/observer_generator.rb
rails3-generators-0.17.5 lib/generators/data_mapper/observer/observer_generator.rb
rails3-generators-0.17.4 lib/generators/data_mapper/observer/observer_generator.rb
rails3-generators-0.17.3 lib/generators/data_mapper/observer/observer_generator.rb
rails3-generators-0.17.2 lib/generators/data_mapper/observer/observer_generator.rb
rails3-generators-0.17.1 lib/generators/data_mapper/observer/observer_generator.rb
rails3-generators-0.17.0 lib/generators/data_mapper/observer/observer_generator.rb
rails3-generators-0.16.1 lib/generators/data_mapper/observer/observer_generator.rb
rails3-generators-0.16.0 lib/generators/data_mapper/observer/observer_generator.rb
rails3-generators-0.15.0 lib/generators/data_mapper/observer/observer_generator.rb
rails3-generators-0.14.0 lib/generators/data_mapper/observer/observer_generator.rb
rails3-generators-0.13.0 lib/generators/data_mapper/observer/observer_generator.rb
rails3-generators-0.12.1 lib/generators/data_mapper/observer/observer_generator.rb
rails3-generators-0.12.0 lib/generators/data_mapper/observer/observer_generator.rb
rails3-generators-0.11.0 lib/generators/data_mapper/observer/observer_generator.rb