class Fetch::Products::InstallGenerator
Public Class Methods
next_migration_number(path)
click to toggle source
# File lib/generators/fetch/products/install_generator.rb, line 10 def self.next_migration_number(path) Time.now.utc.strftime("%Y%m%d%H%M%S") end
Public Instance Methods
create_fetch()
click to toggle source
# File lib/generators/fetch/products/install_generator.rb, line 22 def create_fetch copy_file "product_fetch.rb", "app/models/product_fetch.rb" end
create_model()
click to toggle source
# File lib/generators/fetch/products/install_generator.rb, line 18 def create_model copy_file "product.rb", "app/models/product.rb" end
create_table()
click to toggle source
# File lib/generators/fetch/products/install_generator.rb, line 14 def create_table migration_template "create_products.rb", "db/migrate/create_products.rb" end