Sha256: 451bb29dd628c4d4f159336e14dc9a71e0da93b5e00caf9c2d57d036e9f6e67f

Contents?: true

Size: 604 Bytes

Versions: 29

Compression:

Stored size: 604 Bytes

Contents

require 'active_support'
require 'active_support/core_ext'
require 'thor'
require 'eucalypt/helpers'

module Eucalypt
  module Generators
    class Helper < Thor::Group
      include Thor::Actions
      include Eucalypt::Helpers

      def self.source_root
        File.join File.dirname(__dir__), 'templates'
      end

      def generate(spec: true, name:)
        helper = Inflect.new(:helper, name)
        config = {class_name: helper.class_name}
        template("helper.tt", helper.file_path, config)
        template("helper_spec.tt", helper.spec_path, config) if spec
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
eucalypt-0.9.0 lib/eucalypt/generate/namespaces/generate-helper/generators/helper.rb
eucalypt-0.8.0 lib/eucalypt/generate/namespaces/generate-helper/generators/helper.rb
eucalypt-0.7.2 lib/eucalypt/generate/namespaces/generate-helper/generators/helper.rb
eucalypt-0.7.1 lib/eucalypt/generate/namespaces/generate-helper/generators/helper.rb
eucalypt-0.7.0 lib/eucalypt/generate/namespaces/generate-helper/generators/helper.rb
eucalypt-0.6.2 lib/eucalypt/generate/namespaces/generate-helper/generators/helper.rb
eucalypt-0.6.1 lib/eucalypt/generate/namespaces/generate-helper/generators/helper.rb
eucalypt-0.6.0 lib/eucalypt/generate/namespaces/generate-helper/generators/helper.rb
eucalypt-0.5.4 lib/eucalypt/generate/namespaces/generate-helper/generators/helper.rb
eucalypt-0.5.3 lib/eucalypt/generate/namespaces/generate-helper/generators/helper.rb
eucalypt-0.5.2 lib/eucalypt/generate/namespaces/generate-helper/generators/helper.rb
eucalypt-0.5.1 lib/eucalypt/generate/namespaces/generate-helper/generators/helper.rb
eucalypt-0.5.0 lib/eucalypt/generate/namespaces/generate-helper/generators/helper.rb
eucalypt-0.4.2 lib/eucalypt/generate/namespaces/generate-helper/generators/helper.rb
eucalypt-0.4.1 lib/eucalypt/generate/namespaces/generate-helper/generators/helper.rb
eucalypt-0.4.0 lib/eucalypt/generate/namespaces/generate-helper/generators/helper.rb
eucalypt-0.3.5 lib/eucalypt/generate/namespaces/generate-helper/generators/helper.rb
eucalypt-0.3.4 lib/eucalypt/generate/namespaces/generate-helper/generators/helper.rb
eucalypt-0.3.3 lib/eucalypt/generate/namespaces/generate-helper/generators/helper.rb
eucalypt-0.3.2 lib/eucalypt/generate/namespaces/generate-helper/generators/helper.rb