Sha256: ee00161fd2f06d105e0c949fe2895c901bb26b73889faec2fb5c5e47900c2c16
Contents?: true
Size: 577 Bytes
Versions: 11
Compression:
Stored size: 577 Bytes
Contents
module Navi module Navigable module InstanceMethods def to_navigator(options={}) return navigator_instance if navigator_instance options.merge!(:navigable => self) Navi.navigator_class.new options end def to_navigator!(options={}) navigator = to_navigator(options) navigator.save navigator end private # Easily get the navigator instance based on the Navi.navigator setting def navigator_instance @navigator_instance ||= send(Navi.navigator) end end end end
Version data entries
11 entries across 11 versions & 1 rubygems