Class: DataMetaDom::RecIndex
- Inherits:
-
RecAttrList
- Object
- RecAttr
- RecAttrList
- DataMetaDom::RecIndex
- Defined in:
- lib/dataMetaDom/recAttr.rb
Overview
Record attrubute “index
”
Instance Attribute Summary
Attributes inherited from RecAttr
Class Method Summary collapse
-
.consumed?(source, record) ⇒ Boolean
Attempts to consume the “
index
” attribute for the given Record from the given source.
Instance Method Summary collapse
-
#initialize ⇒ RecIndex
constructor
Creates an instance with the keyword “
index
”.
Methods inherited from RecAttrList
#getKey, #parse, #recAttrParse
Methods inherited from RecAttr
#[], #addArg, #addArgs, #addHint, #addHints, #hasHint?, #join, #length, #parse, #to_s, #updateKey
Constructor Details
#initialize ⇒ RecIndex
Creates an instance with the keyword “index
”
251 252 253 254 |
# File 'lib/dataMetaDom/recAttr.rb', line 251 def initialize #noinspection RubyArgCount super(INDEX) end |
Class Method Details
.consumed?(source, record) ⇒ Boolean
Attempts to consume the “index
” attribute for the given Record from the given source.
-
Parameters
-
source
- an instance of SourceFile
-
261 262 263 |
# File 'lib/dataMetaDom/recAttr.rb', line 261 def self.consumed?(source, record) source.line =~ /^#{INDEX}\W+.+$/ ? record.addIndex(RecIndex.new.parse(source)) : nil end |