Module: Mumukit::Directives::CommentType::Comment

Included in:
Cpp, Haskell, Ruby
Defined in:
lib/mumukit/directives/comment_type.rb

Instance Method Summary collapse

Instance Method Details

#close_commentObject



22
23
24
# File 'lib/mumukit/directives/comment_type.rb', line 22

def close_comment
  Regexp.new Regexp.escape(close)
end

#comment(code) ⇒ Object



14
15
16
# File 'lib/mumukit/directives/comment_type.rb', line 14

def comment(code)
  "#{open}#{code}#{close}"
end

#open_commentObject



18
19
20
# File 'lib/mumukit/directives/comment_type.rb', line 18

def open_comment
  Regexp.new Regexp.escape(open)
end