Class: Yoda::Parsing::Query::CurrentLocationQuery
- Inherits:
-
Object
- Object
- Yoda::Parsing::Query::CurrentLocationQuery
- Defined in:
- lib/yoda/parsing/query/current_location_node_query.rb
Instance Attribute Summary collapse
-
#ast ⇒ Object
readonly
Returns the value of attribute ast.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
Instance Method Summary collapse
- #current_method_definition ⇒ NodeObjects::MethodDefition?
- #current_namespace ⇒ NodeObjects::Namespace?
-
#initialize(ast, location) ⇒ CurrentLocationQuery
constructor
A new instance of CurrentLocationQuery.
Constructor Details
#initialize(ast, location) ⇒ CurrentLocationQuery
Returns a new instance of CurrentLocationQuery.
9 10 11 12 |
# File 'lib/yoda/parsing/query/current_location_node_query.rb', line 9 def initialize(ast, location) @ast = ast @location = location end |
Instance Attribute Details
#ast ⇒ Object (readonly)
Returns the value of attribute ast.
5 6 7 |
# File 'lib/yoda/parsing/query/current_location_node_query.rb', line 5 def ast @ast end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
5 6 7 |
# File 'lib/yoda/parsing/query/current_location_node_query.rb', line 5 def location @location end |
Instance Method Details
#current_method_definition ⇒ NodeObjects::MethodDefition?
20 21 22 |
# File 'lib/yoda/parsing/query/current_location_node_query.rb', line 20 def current_method_definition @current_method_definition ||= namespace.calc_current_location_method(location) end |
#current_namespace ⇒ NodeObjects::Namespace?
15 16 17 |
# File 'lib/yoda/parsing/query/current_location_node_query.rb', line 15 def current_namespace @current_namespace ||= namespace.calc_current_location_namespace(location) end |