Module: ActionTree::Basic::Shared

Included in:
Node, Query
Defined in:
lib/action_tree/basic/shared.rb

Overview

Conatins instance methods shared between Node and Query. Part of ActionTree::Basic and therefore available to all ActionTree dialects.

Instance Method Summary collapse

Instance Method Details

#dialectModule

The dialect that this Node or Query belongs to. The dialect is the module namespace containing the Node and Query classes.

Examples:

a = ActionTree::Basic.new
a.is_a?(ActionTree::Basic::Node) #=> true
a.dialect #=> ActionTree::Basic

Returns:

  • (Module)

    the dialect of the current node or query

See Also:



19
20
21
22
23
24
# File 'lib/action_tree/basic/shared.rb', line 19

def dialect
	self.class.name.split('::')[0..-2].
 inject(Kernel) do |current, next_const|
current.const_get(next_const)
 end
end