Sha256: 99cf7d3af247aca858a2591851d7598967d59093036ec1a04f69c47dd6f64d26

Contents?: true

Size: 624 Bytes

Versions: 8

Compression:

Stored size: 624 Bytes

Contents

# frozen_string_literal: true

require "hanami/version"

module Hanami
  module CLI
    module Generators
      class Context
        def initialize(inflector, app)
          @inflector = inflector
          @app = app
        end

        def ctx
          binding
        end

        def hanami_version
          Hanami::Version.gem_requirement
        end

        def classified_app_name
          inflector.classify(app)
        end

        def underscored_app_name
          inflector.underscore(app)
        end

        private

        attr_reader :inflector

        attr_reader :app
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
hanami-cli-2.0.0.alpha8.1 lib/hanami/cli/generators/context.rb
hanami-cli-2.0.0.alpha8 lib/hanami/cli/generators/context.rb
hanami-cli-2.0.0.alpha7 lib/hanami/cli/generators/context.rb
hanami-cli-2.0.0.alpha6.1 lib/hanami/cli/generators/context.rb
hanami-cli-2.0.0.alpha6 lib/hanami/cli/generators/context.rb
hanami-cli-2.0.0.alpha4 lib/hanami/cli/generators/context.rb
hanami-cli-2.0.0.alpha3 lib/hanami/cli/generators/context.rb
hanami-cli-2.0.0.alpha2 lib/hanami/cli/generators/context.rb