Class: LintFu::EidosBuilder

Inherits:
SexpProcessor
  • Object
show all
Defined in:
lib/lint_fu/eidos_builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_elementObject

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

#eideObject (readonly)

Returns the value of attribute eide.



3
4
5
# File 'lib/lint_fu/eidos_builder.rb', line 3

def eide
  @eide
end

#namespaceObject (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

#buildObject

Raises:

  • (NotImplemented)


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