Sha256: f99d948243207a2324f92a33b5423e384432d9fbcb6175970e2450d0a0c73008
Contents?: true
Size: 1.02 KB
Versions: 1
Compression:
Stored size: 1.02 KB
Contents
# The basic ActionTree namespace that other dialects build upon. Contains default config values, default helpers, and the {Node} and {Query} classes that make up ActionTree's main logic. # # @see https://github.com/jbe/action_tree/wiki/Dialects-and-components Wiki page about dialects and components # module ActionTree::Basic CONFIG = {} require 'action_tree/basic/helpers' module ClassMethods # Create a new ActionTree (or rather, {Node}) # of this dialect def new(*prms, &blk) self::Node.new(*prms, &blk) end # Use a component. The component will be used by all # descending dialects, and must not be used again. 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 end extend ClassMethods require "action_tree/basic/shared" require "action_tree/basic/node" require "action_tree/basic/query" end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
action_tree-0.2.0 | lib/action_tree/basic.rb |