class StringSatisfy

Constants

VERSION

Public Class Methods

new(pattern) click to toggle source
# File lib/string_satisfy.rb, line 7
def initialize(pattern)
  unless Utils.valid_parens_string? pattern
    raise ParensNotMatchError, 'Parentheses are not matched.'
  end

  @pattern = pattern
  @rule_object = Utils.construct_rule_object pattern
end

Public Instance Methods

satisfied_with?(*objects) click to toggle source
# File lib/string_satisfy.rb, line 16
def satisfied_with?(*objects)
  @rule_object.satisfied_with? *objects
end