Sha256: 6976a7bf1dd25948b73642a93b8de8e468f338b4a699a98c054bbe878aac2c13
Contents?: true
Size: 811 Bytes
Versions: 12
Compression:
Stored size: 811 Bytes
Contents
class AdaptorGenerator < Rails::Generator::NamedBase def manifest record do |m| # Check for class naming collisions. m.class_collisions class_path, "ApplicationAdaptor", "#{class_name}Adaptor", "#{class_name}AdaptorTest" # Adaptors and test directories. m.directory File.join('app/adaptors', class_path) m.directory File.join('test/functional', class_path) # Adaptor class and functional test. m.template 'adaptor.rb', File.join('app/adaptors', class_path, "#{file_name}_adaptor.rb") m.template 'functional_test.rb', File.join('test/functional', class_path, "#{file_name}_adaptor_test.rb") end end end
Version data entries
12 entries across 12 versions & 1 rubygems