Class: Object

Inherits:
BasicObject
Defined in:
lib/railings/extensions/extendable.rb

Defined Under Namespace

Classes: Extendable

Instance Method Summary collapse

Instance Method Details

#elementObject



25
26
27
28
29
30
31
32
33
# File 'lib/railings/extensions/extendable.rb', line 25

def element
  if respond_to?(:to_param)
    Extendable.new(self, [to_param])
  elsif respond_to?(:key)
    Extendable.new(self, [key])
  else
    Extendable.new self
  end
end