Class: LibRubyParser::Comment
- Inherits:
-
Object
- Object
- LibRubyParser::Comment
- Defined in:
- lib/lib-ruby-parser.rb
Overview
A class that represents a comment in Ruby
Instance Attribute Summary collapse
-
#kind ⇒ Symbol
Kind of the comment (+:inline+ or +:document+ or +:unknown+).
-
#location ⇒ Loc
Location of the comment (starts with # and ends with the last char).
Instance Method Summary collapse
-
#initialize(location:, kind:) ⇒ Comment
constructor
A new instance of Comment.
Constructor Details
#initialize(location:, kind:) ⇒ Comment
Returns a new instance of Comment.
112 113 114 115 |
# File 'lib/lib-ruby-parser.rb', line 112 def initialize(location:, kind:) @location = location @kind = kind end |
Instance Attribute Details
#kind ⇒ Symbol
Kind of the comment (+:inline+ or +:document+ or +:unknown+)
108 109 110 |
# File 'lib/lib-ruby-parser.rb', line 108 def kind @kind end |
#location ⇒ Loc
Location of the comment (starts with # and ends with the last char)
103 104 105 |
# File 'lib/lib-ruby-parser.rb', line 103 def location @location end |