Class: DataMetaDom::VerDoccable
- Inherits:
-
Documentable
- Object
- Documentable
- DataMetaDom::VerDoccable
- Defined in:
- lib/dataMetaDom/ver.rb
Overview
Anything having a version. It must be also documentable, but not everything documentable is also versionable, like, for example, Record Field or an Enum part.
Direct Known Subclasses
Enum, Field, Mapping, Record, SourceFile
Instance Attribute Summary collapse
-
#ver ⇒ Object
The version info, an instance of Ver.
Attributes inherited from Documentable
Class Method Summary collapse
-
.verConsumed?(src) ⇒ Boolean
Attempts to parse an instance of Ver from the current line on the given instance of SourceFile.
Instance Method Summary collapse
-
#resetEntity ⇒ Object
Resets stateful information on the entity level, like docs that should not apply to the next entity if missing.
Methods inherited from Documentable
#addDoc, #all, #clear, #docConsumed?, #getDoc, #has?, #ids, #initialize
Constructor Details
This class inherits a constructor from DataMetaDom::Documentable
Instance Attribute Details
#ver ⇒ Object
The version info, an instance of Ver.
225 226 227 |
# File 'lib/dataMetaDom/ver.rb', line 225 def ver @ver end |
Class Method Details
.verConsumed?(src) ⇒ Boolean
Attempts to parse an instance of Ver from the current line on the given instance of SourceFile. Returns the instance of Ver if successful, nil otherwise. Parameter:
-
src
- the instance of SourceFile to parse the version info from.
239 240 241 |
# File 'lib/dataMetaDom/ver.rb', line 239 def self.verConsumed?(src) src.line =~ /^\s*#{VER_KW}\s+(\S+)\s*$/ ? Ver.new($1) : nil end |
Instance Method Details
#resetEntity ⇒ Object
Resets stateful information on the entity level, like docs that should not apply to the next entity if missing.
229 230 231 |
# File 'lib/dataMetaDom/ver.rb', line 229 def resetEntity docs.clear end |