Module: GeoPattern::Roles::NamedGenerator

Included in:
BackgroundGenerators::SolidGenerator, StructureGenerators::BaseGenerator
Defined in:
lib/geo_pattern/roles/named_generator.rb

Instance Method Summary collapse

Instance Method Details

#nameObject



10
11
12
# File 'lib/geo_pattern/roles/named_generator.rb', line 10

def name
  Helpers.underscore(Helpers.demodulize(self.class).gsub(/Generator/, "")).to_sym
end

#name?(other_name) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/geo_pattern/roles/named_generator.rb', line 6

def name?(other_name)
  name == other_name.to_sym
end