Class: Foobara::Generators::RackConnectorGenerator::Generators::RackConnectorGenerator

Inherits:
FilesGenerator
  • Object
show all
Defined in:
foobara-rack-connector-generator-0.0.11/src/generators/rack_connector_generator.rb

Constant Summary

Constants included from TruncatedInspect

TruncatedInspect::MAX_LENGTH

Instance Attribute Summary

Attributes inherited from FilesGenerator

#belongs_to_dependency_group, #relevant_manifest

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from FilesGenerator

#absolute_template_path, #applicable?, #dependencies, #dependencies_to_generate, #eql?, #erb_template, #generate, generator_for, #generator_for, generators_for, #generators_for, #initialize, #method_missing, #path_to_root, #respond_to_missing?, #target_dir, #target_path, #template_path, #template_string

Methods included from FilesGenerator::BundlerActions

#bundle_install

Methods included from TruncatedInspect

#inspect, truncating

Constructor Details

This class inherits a constructor from Foobara::FilesGenerator

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Foobara::FilesGenerator

Class Method Details

.manifest_to_generator_classes(manifest) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
# File 'src/generators/rack_connector_generator.rb', line 7

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

Instance Method Details

#==(other) ⇒ Object

TODO: promote this up to base project



30
31
32
33
34
# File 'src/generators/rack_connector_generator.rb', line 30

def ==(other)
  # :nocov:
  self.class == other.class && rack_connector_config == other.rack_connector_config
  # :nocov:
end

#hash ⇒ Object



36
37
38
# File 'src/generators/rack_connector_generator.rb', line 36

def hash
  rack_connector_config.hash
end

#templates_dir ⇒ Object



23
24
25
26
27
# File 'src/generators/rack_connector_generator.rb', line 23

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