Class: DataMetaDom::RegExEntry
- Inherits:
-
Object
- Object
- DataMetaDom::RegExEntry
- Defined in:
- lib/dataMetaDom/util.rb
Overview
holds a custom regex symbol and the variables that use this regex
Instance Attribute Summary collapse
-
#r ⇒ Object
readonly
Returns the value of attribute r.
-
#req ⇒ Object
readonly
Returns the value of attribute req.
-
#vars ⇒ Object
readonly
Returns the value of attribute vars.
Instance Method Summary collapse
-
#<<(var) ⇒ Object
adds the variable to the instance.
-
#initialize(regex, var, req) ⇒ RegExEntry
constructor
initializes interna variables.
- #req? ⇒ Boolean
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
#r ⇒ Object (readonly)
Returns the value of attribute r.
177 178 179 |
# File 'lib/dataMetaDom/util.rb', line 177 def r @r end |
#req ⇒ Object (readonly)
Returns the value of attribute req.
177 178 179 |
# File 'lib/dataMetaDom/util.rb', line 177 def req @req end |
#vars ⇒ Object (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
189 |
# File 'lib/dataMetaDom/util.rb', line 189 def req?; @req end |