Module: ActionTree::Basic::ClassMethods

Included in:
ActionTree::Basic
Defined in:
lib/action_tree/basic.rb

Instance Method Summary collapse

Instance Method Details

#new(*prms, &blk) ⇒ Object

Create a new ActionTree (or rather, Node) of this dialect



16
17
18
# File 'lib/action_tree/basic.rb', line 16

def new(*prms, &blk)
  self::Node.new(*prms, &blk)
end

#use(component) ⇒ Object

Use a component. The component will be used by all descending dialects, and must not be used again.



22
23
24
25
26
27
# File 'lib/action_tree/basic.rb', line 22

def use(component)
  self::Node.send    :include, component::NodeMethods
  self::Query.send   :include, component::QueryMethods
  self::Helpers.send :include, component::Helpers
  self::CONFIG.merge!          component::CONFIG
end