module Nomener

Base module for our names

configuration module for our names

Module defining the Nomener version

Constants

VERSION

Public Class Methods

config() click to toggle source

Internal: Read accessor for configuration

Returns the configuration

# File lib/nomener.rb, line 45
def self.config
  self.configure unless @@config
  @@config
end
configure() { |config| ... } click to toggle source

Public: to configure the Nomener object

can set individually or by block
See Nomener::Configuration for more details on what may be set

Returns the configuration object

# File lib/nomener.rb, line 29
def self.configure
  @@config ||= Nomener::Configuration.new
  yield config if block_given?
  @@config
end
parse(name) click to toggle source

Public: Convenience method to parse a name

name - a string of a name to parse

Returns a <Nomener::Name> or nil if it couldn’t be parsed

# File lib/nomener.rb, line 20
def self.parse(name)
  Name.new(name).parse
end
reset() click to toggle source

Public: set the configuration to the Nomener::Configuration defaults

Returns the configuration object

# File lib/nomener.rb, line 38
def self.reset
  @@config = Nomener::Configuration.new
end