Class: Yoda::Parsing::Query::CurrentNodeCommentQuery
- Inherits:
-
Object
- Object
- Yoda::Parsing::Query::CurrentNodeCommentQuery
- Defined in:
- lib/yoda/parsing/query/current_node_comment_query.rb
Instance Attribute Summary collapse
-
#ast ⇒ Object
readonly
Returns the value of attribute ast.
-
#comments ⇒ Object
readonly
Returns the value of attribute comments.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
Instance Method Summary collapse
- #current_commenting_node ⇒ Array<::Parser::Source::Comment>
-
#initialize(comments, location) ⇒ CurrentNodeCommentQuery
constructor
A new instance of CurrentNodeCommentQuery.
Constructor Details
#initialize(comments, location) ⇒ CurrentNodeCommentQuery
Returns a new instance of CurrentNodeCommentQuery.
10 11 12 13 14 |
# File 'lib/yoda/parsing/query/current_node_comment_query.rb', line 10 def initialize(comments, location) @ast = ast @comments = comments @location = location end |
Instance Attribute Details
#ast ⇒ Object (readonly)
Returns the value of attribute ast.
5 6 7 |
# File 'lib/yoda/parsing/query/current_node_comment_query.rb', line 5 def ast @ast end |
#comments ⇒ Object (readonly)
Returns the value of attribute comments.
5 6 7 |
# File 'lib/yoda/parsing/query/current_node_comment_query.rb', line 5 def comments @comments end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
5 6 7 |
# File 'lib/yoda/parsing/query/current_node_comment_query.rb', line 5 def location @location end |
Instance Method Details
#current_commenting_node ⇒ Array<::Parser::Source::Comment>
17 18 19 |
# File 'lib/yoda/parsing/query/current_node_comment_query.rb', line 17 def current_commenting_node @current_commenting_node ||= inverse_association[current_comment_block] end |