Class: Sourcify::Proc::Scanner::Comment

Inherits:
Object
  • Object
show all
Defined in:
lib/sourcify/proc/scanner/comment.rb

Instance Method Summary collapse

Instance Method Details

#<<(content) ⇒ Object



6
7
8
# File 'lib/sourcify/proc/scanner/comment.rb', line 6

def <<(content)
  (@contents ||= []) << content
end

#closed?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/sourcify/proc/scanner/comment.rb', line 14

def closed?
  @contents[-1].split("\n")[-1].strip == '=end'
end

#to_sObject



10
11
12
# File 'lib/sourcify/proc/scanner/comment.rb', line 10

def to_s
  @contents.join
end