Class: LintFu::EidosBuilder
- Inherits:
-
SexpProcessor
- Object
- SexpProcessor
- LintFu::EidosBuilder
- Defined in:
- lib/lint_fu/eidos_builder.rb
Direct Known Subclasses
Plugins::ActionPack::ControllerEidosBuilder, Plugins::ActiveRecord::ModelEidosBuilder, Plugins::Rails::ModelApplicationFactory
Instance Attribute Summary collapse
-
#current_model_element ⇒ Object
Returns the value of attribute current_model_element.
-
#eide ⇒ Object
readonly
Returns the value of attribute eide.
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(namespace = nil) ⇒ EidosBuilder
constructor
A new instance of EidosBuilder.
-
#process_class(sexp) ⇒ Object
- sexp
-
[:class, <classname>, <superclass|nil>, <:scope - CLASS DEFS>].
-
#process_module(sexp) ⇒ Object
- sexp
-
[:module, <modulename>, <:scope - MODULE DEFS>].
Constructor Details
#initialize(namespace = nil) ⇒ EidosBuilder
Returns a new instance of EidosBuilder.
6 7 8 9 10 11 12 |
# File 'lib/lint_fu/eidos_builder.rb', line 6 def initialize(namespace=nil) super() @eide = [] @namespace = namespace || [] self.require_empty = false self.auto_shift_type = false end |
Instance Attribute Details
#current_model_element ⇒ Object
Returns the value of attribute current_model_element.
4 5 6 |
# File 'lib/lint_fu/eidos_builder.rb', line 4 def current_model_element @current_model_element end |
#eide ⇒ Object (readonly)
Returns the value of attribute eide.
3 4 5 |
# File 'lib/lint_fu/eidos_builder.rb', line 3 def eide @eide end |
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace.
3 4 5 |
# File 'lib/lint_fu/eidos_builder.rb', line 3 def namespace @namespace end |
Instance Method Details
#build ⇒ Object
30 31 32 |
# File 'lib/lint_fu/eidos_builder.rb', line 30 def build raise NotImplemented end |
#process_class(sexp) ⇒ Object
- sexp
- :class, <classname>, <superclass|nil>, <:scope - CLASS DEFS>
23 24 25 26 27 28 |
# File 'lib/lint_fu/eidos_builder.rb', line 23 def process_class(sexp) @namespace.push sexp[1] process(sexp[3]) @namespace.pop return sexp end |
#process_module(sexp) ⇒ Object
- sexp
- :module, <modulename>, <:scope - MODULE DEFS>
15 16 17 18 19 20 |
# File 'lib/lint_fu/eidos_builder.rb', line 15 def process_module(sexp) @namespace.push sexp[1] process(sexp[2]) @namespace.pop return sexp end |