module Peregrine::Features::Nameable

Provides methods for naming objects. Intended to be included in classes requiring this functionality.

Public Instance Methods

name() click to toggle source

Returns the name of the object. Lazily evaluated.

# File lib/peregrine/features/nameable.rb, line 7
def name
  @name ||= self.class.to_s
end
name=(value) click to toggle source

Sets the name of the object to the given value after String coercion.

# File lib/peregrine/features/nameable.rb, line 12
def name=(value)
  @name = value.to_s
end