Sha256: 17b95e5e1e146619cb4af8b18a05f4f7c0346629d3b437f407adead614698f1f

Contents?: true

Size: 926 Bytes

Versions: 2

Compression:

Stored size: 926 Bytes

Contents

# === GEM AUTO-RELOADING ===

class ::ExtensionGem
  # @return [String] Name of the gem.
  attr_reader :name
  # @return [Pathname] Path to the gem.
  attr_reader :path
  # @return [Array<Symbol>] Top-level constants defined by the gem.
  attr_reader :constants
  # @return [String]
  attr_reader :require_path

  # @param name [String]
  # @param path [String, Pathname]
  # @param constants [Array<Symbol>]
  # @param require_path [String, nil]
  def initialize(name:, path:, constants:, require_path: nil)
    @name = name
    @path = ::File.expand_path(path, __dir__)
    @constants = constants
    @require_path = require_path || @name.gsub('-', '/')
  end
end

# @return [ExtensionGem]
::AMBER_EXTENSION_GEM = ::ExtensionGem.new(
  name: "<%= gem_name %>",
  path: '..',
  constants: %i[<%= root_module_name %>].freeze
)
gem ::AMBER_EXTENSION_GEM.name, path: ::AMBER_EXTENSION_GEM.path

# === END GEM AUTO-RELOADING ===

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
amber_extension_generator-1.0.0 lib/amber_extension_generator/templates/rails_dummy/Gemfile.erb
amber_extension_generator-0.0.5 lib/amber_extension_generator/templates/rails_dummy/Gemfile.erb