Method: Innate::Node#mapping

Defined in:
lib/innate/node.rb

#mappingString

Tries to find the relative url that this Innate::Node is mapped to. If it cannot find one it will instead generate one based on the snake_cased name of itself.

Examples:

Usage:


class FooBar
  include Innate::Node
end
FooBar.mapping # => '/foo_bar'

Returns:

  • (String)

    the relative path to the node

See Also:

Author:

  • manveru



115
116
117
# File 'lib/innate/node.rb', line 115

def mapping
  Innate.to(self)
end