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 9
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 4
def parameterized?
  self.include?('@(')
end