Class: DataMetaDom::RecAttrList

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

Overview

The record attribute with the ordered list of arguments. See RecAttrSet for the unordered set implementation.

Direct Known Subclasses

RecIndex

Instance Attribute Summary

Attributes inherited from RecAttr

#args, #hints, #key, #keyword

Instance Method Summary collapse

Methods inherited from RecAttr

#[], #addArg, #addArgs, #addHint, #addHints, #hasHint?, #join, #length, #to_s, #updateKey

Constructor Details

#initialize(keyword) ⇒ RecAttrList

Creates an instance with the given keyword



186
# File 'lib/dataMetaDom/recAttr.rb', line 186

def initialize(keyword); super(keyword) end

Instance Method Details

#getKeyObject

Builds the unique key for the list of arguments on the instance



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

def getKey; @args.map { |a| a.to_s }.join(':').to_sym end

#parse(src) ⇒ Object

Parses the instance from the given source preserving the order of arguments, returns self for call chaining.

  • Parameters

    • src - an instance of SourceFile



196
197
198
199
200
# File 'lib/dataMetaDom/recAttr.rb', line 196

def parse(src)
    recAttrParse(src)
    updateKey
    self
end

#recAttrParseObject

Engages the super’s parse method via the alias



183
# File 'lib/dataMetaDom/recAttr.rb', line 183

alias :recAttrParse :parse