Class: RBeautify::BlockEnd
- Defined in:
- lib/ruby-beautify/lib/ruby-beautify/block_end.rb
Instance Attribute Summary collapse
-
#after_match ⇒ Object
Returns the value of attribute after_match.
-
#block_start ⇒ Object
Returns the value of attribute block_start.
-
#match ⇒ Object
Returns the value of attribute match.
-
#offset ⇒ Object
Returns the value of attribute offset.
Instance Method Summary collapse
- #end_can_also_be_start? ⇒ Boolean
- #end_offset ⇒ Object
-
#initialize(block_start, offset, match, after_match) ⇒ BlockEnd
constructor
A new instance of BlockEnd.
Constructor Details
#initialize(block_start, offset, match, after_match) ⇒ BlockEnd
Returns a new instance of BlockEnd.
7 8 9 10 11 12 |
# File 'lib/ruby-beautify/lib/ruby-beautify/block_end.rb', line 7 def initialize(block_start, offset, match, after_match) self.block_start = block_start self.offset = offset self.match = match self.after_match = after_match end |
Instance Attribute Details
#after_match ⇒ Object
Returns the value of attribute after_match.
5 6 7 |
# File 'lib/ruby-beautify/lib/ruby-beautify/block_end.rb', line 5 def after_match @after_match end |
#block_start ⇒ Object
Returns the value of attribute block_start.
5 6 7 |
# File 'lib/ruby-beautify/lib/ruby-beautify/block_end.rb', line 5 def block_start @block_start end |
#match ⇒ Object
Returns the value of attribute match.
5 6 7 |
# File 'lib/ruby-beautify/lib/ruby-beautify/block_end.rb', line 5 def match @match end |
#offset ⇒ Object
Returns the value of attribute offset.
5 6 7 |
# File 'lib/ruby-beautify/lib/ruby-beautify/block_end.rb', line 5 def offset @offset end |
Instance Method Details
#end_can_also_be_start? ⇒ Boolean
18 19 20 |
# File 'lib/ruby-beautify/lib/ruby-beautify/block_end.rb', line 18 def end_can_also_be_start? block_start.block_matcher.end_can_also_be_start? end |
#end_offset ⇒ Object
14 15 16 |
# File 'lib/ruby-beautify/lib/ruby-beautify/block_end.rb', line 14 def end_offset offset + match.length end |