Class: DataMetaDom::RecUnique
- Inherits:
-
RecAttrSet
- Object
- RecAttr
- RecAttrSet
- DataMetaDom::RecUnique
- Defined in:
- lib/dataMetaDom/recAttr.rb
Overview
Record attrubute “unique
”
Instance Attribute Summary
Attributes inherited from RecAttrSet
Attributes inherited from RecAttr
Class Method Summary collapse
-
.consumed?(source, record) ⇒ Boolean
Attempts to consume the “
unique
” attribute for the given Record from the given source.
Instance Method Summary collapse
-
#initialize ⇒ RecUnique
constructor
Creates an instance with the keyword “
unique
”.
Methods inherited from RecAttrSet
#addArg, #argSetTextual, #getKey, #hasArg?, #parse, #recAttrParse
Methods inherited from RecAttr
#[], #addArg, #addArgs, #addHint, #addHints, #hasHint?, #join, #length, #parse, #to_s, #updateKey
Constructor Details
Class Method Details
.consumed?(source, record) ⇒ Boolean
Attempts to consume the “unique
” attribute for the given Record from the given source.
-
Parameters
-
source
- an instance of SourceFile
-
219 220 221 |
# File 'lib/dataMetaDom/recAttr.rb', line 219 def self.consumed?(source, record) source.line =~ /^#{UNIQUE}\W.+$/ ? record.addUnique(RecUnique.new.parse(source)) : nil end |