Method: Innate::Node#map

Defined in:
lib/innate/node.rb

#map(location) ⇒ Object

Shortcut to map or remap this Node.

Examples:

Usage for explicit mapping:


class FooBar
  include Innate::Node
  map '/foo_bar'
end

Innate.to(FooBar) # => '/foo_bar'

Usage for automatic mapping:


class FooBar
  include Innate::Node
  map mapping
end

Innate.to(FooBar) # => '/foo_bar'

Parameters:

  • location (#to_s)

See Also:

  • SingletonMethods::map

Author:

  • manveru



144
145
146
147
# File 'lib/innate/node.rb', line 144

def map(location)
  trait :skip_node_map => true
  Innate.map(location, self)
end