Module: Mobility::Plugins::Attributes

Extended by:
Mobility::Plugin
Defined in:
lib/mobility/plugins/attributes.rb

Overview

Takes arguments, converts them to strings, and stores in an array @names, made available with an attr_reader. Also provides some convenience methods for aggregating attributes.

Defined Under Namespace

Modules: ClassMethods Classes: FrozenAttributesError

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Mobility::Plugin

configure, configure_default, default, dependencies, dependencies_satisfied?, included, included_hook, initialize_hook, requires

Instance Attribute Details

#namesArray<String> (readonly)

Attribute names for which accessors will be defined

Returns:

  • (Array<String>)

    Array of names



16
17
18
# File 'lib/mobility/plugins/attributes.rb', line 16

def names
  @names
end

Instance Method Details

#inspectString

Show useful information about this module.

Returns:

  • (String)


24
25
26
# File 'lib/mobility/plugins/attributes.rb', line 24

def inspect
  "#<Translations @names=#{names.join(", ")}>"
end