Class: DataMetaDom::RecIdentity
- Inherits:
-
RecAttrSet
- Object
- RecAttr
- RecAttrSet
- DataMetaDom::RecIdentity
- Defined in:
- lib/dataMetaDom/recAttr.rb
Overview
Record attrubute “identity
”
Instance Attribute Summary
Attributes inherited from RecAttrSet
Attributes inherited from RecAttr
Class Method Summary collapse
-
.consumed?(source, record) ⇒ Boolean
Attempts to consume the “
identity
” attribute for the given Record from the given source.
Instance Method Summary collapse
-
#initialize ⇒ RecIdentity
constructor
Creates an instance with the keyword “
identity
”.
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
#initialize ⇒ RecIdentity
Creates an instance with the keyword “identity
”
230 231 232 233 |
# File 'lib/dataMetaDom/recAttr.rb', line 230 def initialize #noinspection RubyArgCount super(IDENTITY) end |
Class Method Details
.consumed?(source, record) ⇒ Boolean
Attempts to consume the “identity
” attribute for the given Record from the given source.
-
Parameters
-
source
- an instance of SourceFile
-
240 241 242 |
# File 'lib/dataMetaDom/recAttr.rb', line 240 def self.consumed?(source, record) source.line =~ /^#{IDENTITY}\W+.+$/ ? record.identity = RecIdentity.new.parse(source) : nil end |