Class: Pragmater::Parsers::Comments
- Inherits:
-
Object
- Object
- Pragmater::Parsers::Comments
- Defined in:
- lib/pragmater/parsers/comments.rb
Overview
Manages pragma comments.
Instance Method Summary collapse
-
#initialize(older, newer, formatter: Formatters::Main) ⇒ Comments
constructor
A new instance of Comments.
- #insert ⇒ Object
- #remove ⇒ Object
Constructor Details
#initialize(older, newer, formatter: Formatters::Main) ⇒ Comments
Returns a new instance of Comments.
7 8 9 10 11 |
# File 'lib/pragmater/parsers/comments.rb', line 7 def initialize older, newer, formatter: Formatters::Main @formatter = formatter @older = format older @newer = format newer end |
Instance Method Details
#insert ⇒ Object
13 |
# File 'lib/pragmater/parsers/comments.rb', line 13 def insert = older.union(newer) |
#remove ⇒ Object
15 |
# File 'lib/pragmater/parsers/comments.rb', line 15 def remove = older - older.intersection(newer) |