Sha256: ae4277ed5575e2bf83e4b57706f242c02e193f06507ed797751753d4a73972a1

Contents?: true

Size: 1.08 KB

Versions: 7

Compression:

Stored size: 1.08 KB

Contents

module Foobara
  module Generators
    module RackConnectorGenerator
      module Generators
        class RackConnectorGenerator < Foobara::FilesGenerator
          class << self
            def manifest_to_generator_classes(manifest)
              case manifest
              when RackConnectorConfig
                [
                  Generators::GemfileGenerator
                ]
              else
                # :nocov:
                raise "Not sure how build a generator for a #{manifest}"
                # :nocov:
              end
            end
          end

          alias rack_connector_config relevant_manifest

          def templates_dir
            # :nocov:
            "#{__dir__}/../../templates"
            # :nocov:
          end

          # TODO: promote this up to base project
          def ==(other)
            # :nocov:
            self.class == other.class && rack_connector_config == other.rack_connector_config
            # :nocov:
          end

          def hash
            rack_connector_config.hash
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
foobara-rack-connector-generator-0.0.7 src/generators/rack_connector_generator.rb
foobara-rack-connector-generator-0.0.6 src/generators/rack_connector_generator.rb
foobara-rack-connector-generator-0.0.5 src/generators/rack_connector_generator.rb
foobara-rack-connector-generator-0.0.4 src/generators/rack_connector_generator.rb
foobara-rack-connector-generator-0.0.3 src/generators/rack_connector_generator.rb
foobara-rack-connector-generator-0.0.2 src/generators/rack_connector_generator.rb
foobara-rack-connector-generator-0.0.1 src/generators/rack_connector_generator.rb