Class: Mongoid::SyncMachineGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/mongoid/sync_machine_generator.rb

Overview

Generate SyncMachine files for Mongoid.

Instance Method Summary collapse

Instance Method Details

#create_payload_fileObject



9
10
11
# File 'lib/generators/mongoid/sync_machine_generator.rb', line 9

def create_payload_file
  template "payload.rb", "app/models/#{file_path}/payload.rb"
end

#create_sync_fileObject



13
14
15
# File 'lib/generators/mongoid/sync_machine_generator.rb', line 13

def create_sync_file
  template "sync.rb", "app/services/#{file_path}.rb"
end