Module: ActionTree::Plugins::Tilt::NodeMixin

Defined in:
lib/action_tree/plugins/tilt.rb

Instance Method Summary collapse

Instance Method Details

#layout(path, namespace = nil) ⇒ Object

sets a default, optionally namespaced, layout for this and descending nodes



13
14
15
# File 'lib/action_tree/plugins/tilt.rb', line 13

def layout(path, namespace=nil)
  layout_namespaces[namespace] = path
end

#layout_namespacesObject



17
18
19
# File 'lib/action_tree/plugins/tilt.rb', line 17

def layout_namespaces
  @layout_namespaces ||= {}
end

#view_path(path = nil) ⇒ Object

sets a default view folder path for this and descending nodes.



22
23
24
# File 'lib/action_tree/plugins/tilt.rb', line 22

def view_path(path=nil)
  path ? @view_path = path : @view_path
end