Class: DataMetaDom::RegExEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/dataMetaDom/util.rb

Overview

holds a custom regex symbol and the variables that use this regex

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(regex, var, req) ⇒ RegExEntry

initializes interna variables



179
180
181
182
183
# File 'lib/dataMetaDom/util.rb', line 179

def initialize(regex, var, req)
    @r = regex
    @vars = Set.new [var]
    @req = req
end

Instance Attribute Details

#rObject (readonly)

Returns the value of attribute r.



177
178
179
# File 'lib/dataMetaDom/util.rb', line 177

def r
  @r
end

#reqObject (readonly)

Returns the value of attribute req.



177
178
179
# File 'lib/dataMetaDom/util.rb', line 177

def req
  @req
end

#varsObject (readonly)

Returns the value of attribute vars.



177
178
179
# File 'lib/dataMetaDom/util.rb', line 177

def vars
  @vars
end

Instance Method Details

#<<(var) ⇒ Object

adds the variable to the instance



185
186
187
# File 'lib/dataMetaDom/util.rb', line 185

def <<(var)
    @vars << var
end

#req?Boolean

Returns:

  • (Boolean)


189
# File 'lib/dataMetaDom/util.rb', line 189

def req?; @req end