class String
extending String
with parameterized?
and balanced_parens?
only to assist macro.rb
Public Instance Methods
balanced_parens?()
click to toggle source
returns whether number of open parentheses and close parentheses match
# File lib/ruby_ext/string.rb, line 12 def balanced_parens? self.match(/\(/).size == self.match(/\)/).size end
parameterized?()
click to toggle source
returns whether or not contents include any Macro
strings i.e. Parameter expressions
# File lib/ruby_ext/string.rb, line 7 def parameterized? self.include?('@(') end