Class: Simplabs::Excellent::Parsing::CvarContext
- Inherits:
-
SexpContext
- Object
- SexpContext
- Simplabs::Excellent::Parsing::CvarContext
- Defined in:
- lib/simplabs/excellent/parsing/cvar_context.rb
Overview
:nodoc:
Instance Attribute Summary
Attributes inherited from SexpContext
Instance Method Summary collapse
- #full_name ⇒ Object
-
#initialize(exp, parent) ⇒ CvarContext
constructor
A new instance of CvarContext.
Methods inherited from SexpContext
Constructor Details
#initialize(exp, parent) ⇒ CvarContext
Returns a new instance of CvarContext.
9 10 11 12 |
# File 'lib/simplabs/excellent/parsing/cvar_context.rb', line 9 def initialize(exp, parent) super @name = exp[1].to_s.sub(/^@+/, '') end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Simplabs::Excellent::Parsing::SexpContext
Instance Method Details
#full_name ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/simplabs/excellent/parsing/cvar_context.rb', line 14 def full_name return @name if @parent.blank? full_name = @name parent = @parent parent = parent.parent until parent.is_a?(ClassContext) || parent.is_a?(ModuleContext) full_name = "#{parent.full_name}.#{full_name}" end |