Sha256: e18a0400f9c9610a5fe5dbeb7e83ee5b09d906fe7054316334c9d415ede95df9

Contents?: true

Size: 427 Bytes

Versions: 19

Compression:

Stored size: 427 Bytes

Contents

require 'rails/generators'

module TryApi
  class InstallGenerator < ::Rails::Generators::Base
    source_root File.expand_path("../templates", __FILE__)
    desc "This generator generates config file for API interface."

    def init_environment
      app = ::Rails.application
      @app_name = app.class.to_s.split("::").first
    end

    def create_config_file
      directory 'try_api', 'config/try_api'
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
try_api-0.1.18 lib/generators/try_api/install_generator.rb
try_api-0.1.17 lib/generators/try_api/install_generator.rb
try_api-0.1.16 lib/generators/try_api/install_generator.rb
try_api-0.1.15 lib/generators/try_api/install_generator.rb
try_api-0.1.14 lib/generators/try_api/install_generator.rb
try_api-0.1.13 lib/generators/try_api/install_generator.rb
try_api-0.1.12 lib/generators/try_api/install_generator.rb
try_api-0.1.11 lib/generators/try_api/install_generator.rb
try_api-0.1.10 lib/generators/try_api/install_generator.rb
try_api-0.1.9 lib/generators/try_api/install_generator.rb
try_api-0.1.8 lib/generators/try_api/install_generator.rb
try_api-0.1.7 lib/generators/try_api/install_generator.rb
try_api-0.1.6 lib/generators/try_api/install_generator.rb
try_api-0.1.5 lib/generators/try_api/install_generator.rb
try_api-0.1.4 lib/generators/try_api/install_generator.rb
try_api-0.1.3 lib/generators/try_api/install_generator.rb
try_api-0.1.2 lib/generators/try_api/install_generator.rb
try_api-0.1.1 lib/generators/try_api/install_generator.rb
try_api-0.1.0 lib/generators/try_api/install_generator.rb