Module: Rubyang::Model
- Defined in:
- lib/rubyang/model.rb,
lib/rubyang/model/logger.rb,
lib/rubyang/model/parser.rb,
lib/rubyang/model/parser/parser.tab.rb
Defined Under Namespace
Classes: Anyxml, ArgStmt, Argument, Augment, Base, BaseStmt, BelongsTo, Bit, Case, Choice, Config, ConformanceRelated, Contact, Container, Default, Description, Deviate, Deviation, Enum, ErrorAppTag, ErrorMessage, Extension, Feature, FractionDigits, Grouping, Identity, Identityref, IfFeature, Import, Include, Input, Key, Leaf, LeafList, Leafref, Length, List, Logger, Mandatory, MaxElements, MinElements, Module, Must, Namespace, NoArgStmt, Notification, OrderedBy, Organization, Output, Parser, Path, Pattern, Position, Prefix, Presence, Range, Reference, Refine, RequireInstance, Revision, RevisionDate, Rpc, Status, StmtMap, Submodule, Type, Typedef, Union, Unique, Units, Unknown, Uses, Value, When, YangVersion, YinElement
Instance Method Summary
collapse
Instance Method Details
#absolute_schema_nodeid ⇒ Object
17
18
19
|
# File 'lib/rubyang/model.rb', line 17
def absolute_schema_nodeid
"(?:(?:/#{node_identifier})+)"
end
|
#descendant_schema_nodeid ⇒ Object
20
21
22
|
# File 'lib/rubyang/model.rb', line 20
def descendant_schema_nodeid
"(?:#{node_identifier}#{absolute_schema_nodeid})"
end
|
#dquote ⇒ Object
44
45
46
|
# File 'lib/rubyang/model.rb', line 44
def dquote
'"'
end
|
#identifier ⇒ Object
41
42
43
|
# File 'lib/rubyang/model.rb', line 41
def identifier
'(?:[a-zA-Z][a-zA-Z0-9._-]*)'
end
|
#instance_identifier ⇒ Object
26
27
28
|
# File 'lib/rubyang/model.rb', line 26
def instance_identifier
"(?:(?:/#{node_identifier}(?:#{predicate})*)+)"
end
|
#node_identifier ⇒ Object
23
24
25
|
# File 'lib/rubyang/model.rb', line 23
def node_identifier
"(?:(?:#{prefix}:)?#{identifier})"
end
|
#pos ⇒ Object
35
36
37
|
# File 'lib/rubyang/model.rb', line 35
def pos
'(?:[0-9]+)'
end
|
#predicate ⇒ Object
29
30
31
|
# File 'lib/rubyang/model.rb', line 29
def predicate
"(?:\[#{wsp}*(?:#{predicate_expr}|#{pos})#{wsp}*\])"
end
|
#predicate_expr ⇒ Object
32
33
34
|
# File 'lib/rubyang/model.rb', line 32
def predicate_expr
"(?:(?:#{node_identifier}|[.])#{wsp}*=#{wsp}*(?:(?:#{dquote}[^#{dquote}]*#{dquote})|(?:#{squote}[^#{squote}]*#{squote})))"
end
|
#prefix ⇒ Object
38
39
40
|
# File 'lib/rubyang/model.rb', line 38
def prefix
"(?:#{identifier})"
end
|
#schema_nodeid ⇒ Object
14
15
16
|
# File 'lib/rubyang/model.rb', line 14
def schema_nodeid
"(?:#{absolute_schema_nodeid}|#{descendant_schema_nodeid})"
end
|
#squote ⇒ Object
47
48
49
|
# File 'lib/rubyang/model.rb', line 47
def squote
"'"
end
|
#wsp ⇒ Object
50
51
52
|
# File 'lib/rubyang/model.rb', line 50
def wsp
'(?:[ \t])'
end
|