Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/defmastership/comment_filter.rb

Overview

adding a method to string to figure out if a string is commented or not.

Instance Method Summary collapse

Instance Method Details

#commented?Boolean

Returns true if the line is commented.

Returns:

  • (Boolean)

    true if the line is commented



8
9
10
# File 'lib/defmastership/comment_filter.rb', line 8

def commented?
  !!match(Defmastership::Core::DMRegexp::SINGLE_LINE_COMMENT)
end