File: block_end.rb

package info (click to toggle)
sonic-pi 2.10.0~repack-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 34,952 kB
  • ctags: 3,436
  • sloc: ruby: 22,828; cpp: 6,154; sh: 80; makefile: 41
file content (23 lines) | stat: -rwxr-xr-x 461 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module RBeautifyLegacy

  class BlockEnd

    attr_accessor :block_start, :offset, :match, :after_match

    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

    def end_offset
      offset + match.length
    end

    def end_can_also_be_start?
      block_start.block_matcher.end_can_also_be_start?
    end
  end

end