Sha256: 681e365c69da90d499fbd85c75ede159e115629d5f8439d1c1c5800d1be35b76

Contents?: true

Size: 321 Bytes

Versions: 13

Compression:

Stored size: 321 Bytes

Contents

class JoyMenuGenerator < Rails::Generators::Base
  source_root File.expand_path('templates', __dir__)
  argument :menu_name, type: :string

  def generate_menu
    create_menu
  end

  private
  def create_menu
    template 'joy_menu_template.template', "app/services/ussd/menus/#{menu_name.underscore}_menu.rb"
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
joy_ussd_engine-0.1.14 lib/generators/joy_menu/joy_menu_generator.rb
joy_ussd_engine-0.1.13 lib/generators/joy_menu/joy_menu_generator.rb
joy_ussd_engine-0.1.12 lib/generators/joy_menu/joy_menu_generator.rb
joy_ussd_engine-0.1.11 lib/generators/joy_menu/joy_menu_generator.rb
joy_ussd_engine-0.1.10 lib/generators/joy_menu/joy_menu_generator.rb
joy_ussd_engine-0.1.9 lib/generators/joy_menu/joy_menu_generator.rb
joy_ussd_engine-0.1.8 lib/generators/joy_menu/joy_menu_generator.rb
joy_ussd_engine-0.1.7 lib/generators/joy_menu/joy_menu_generator.rb
joy_ussd_engine-0.1.6 lib/generators/joy_menu/joy_menu_generator.rb
joy_ussd_engine-0.1.5 lib/generators/joy_menu/joy_menu_generator.rb
joy_ussd_engine-0.1.3 lib/generators/joy_menu/joy_menu_generator.rb
joy_ussd_engine-0.1.2 lib/generators/joy_menu/joy_menu_generator.rb
joy_ussd_engine-0.1.0 lib/generators/joy_menu/joy_menu_generator.rb