Class: TwitterCldr::Utils::RegexpAst::CharacterSet

Inherits:
Node
  • Object
show all
Defined in:
lib/twitter_cldr/utils/regexp_ast.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#expressions, #quantifier

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#quantified?

Constructor Details

#initialize(expressions, quantifier, members, negated) ⇒ CharacterSet

Returns a new instance of CharacterSet.



41
42
43
44
# File 'lib/twitter_cldr/utils/regexp_ast.rb', line 41

def initialize(expressions, quantifier, members, negated)
  @members = members; @negated = negated
  super(expressions, quantifier)
end

Instance Attribute Details

#membersObject (readonly)

Returns the value of attribute members.



38
39
40
# File 'lib/twitter_cldr/utils/regexp_ast.rb', line 38

def members
  @members
end

#negatedObject (readonly) Also known as: negated?

Returns the value of attribute negated.



38
39
40
# File 'lib/twitter_cldr/utils/regexp_ast.rb', line 38

def negated
  @negated
end

Class Method Details

.from_parser_node(node, expressions) ⇒ Object



46
47
48
49
50
51
# File 'lib/twitter_cldr/utils/regexp_ast.rb', line 46

def self.from_parser_node(node, expressions)
  new(
    expressions, Quantifier.from_parser_node(node),
    fix_members(node.members), node.negative?
  )
end