Module: Citrus::Grammar
- Defined in:
- lib/citrus.rb
Overview
Inclusion of this module into another extends the receiver with the grammar helper methods in GrammarMethods. Although this module does not actually provide any methods, constants, or variables to modules that include it, the mere act of inclusion provides a useful lookup mechanism to determine if a module is in fact a grammar.
Class Method Summary collapse
-
.included(mod) ⇒ Object
Extends all modules that
include Grammarwith GrammarMethods and exposes Module#include. -
.new(&block) ⇒ Object
Creates a new anonymous module that includes Grammar.
Class Method Details
.included(mod) ⇒ Object
Extends all modules that include Grammar with GrammarMethods and
exposes Module#include.
368 369 370 371 372 |
# File 'lib/citrus.rb', line 368 def self.included(mod) mod.extend(GrammarMethods) # Expose #include so it can be called publicly. class << mod; public :include end end |