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



8
9
10
# File 'lib/geo_pattern/roles/named_generator.rb', line 8

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

#name?(other_name) ⇒ Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/geo_pattern/roles/named_generator.rb', line 4

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