Class: Raml::PropertiesNode
- Inherits:
-
Node
- Object
- Node
- Raml::PropertiesNode
show all
- Defined in:
- lib/raml/node.rb
Instance Attribute Summary collapse
Attributes inherited from Node
#name, #parent
Instance Method Summary
collapse
Constructor Details
#initialize(name, properties, parent) ⇒ PropertiesNode
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
# File 'lib/raml/node.rb', line 90
def initialize(name, properties, parent)
if name.is_a? String and name.end_with? '?'
allow_optional? parent
name = name.dup.chomp! '?'
@optional = true
else
@optional = false
end
super name, parent
@children ||= []
parse_and_validate_props properties
end
|
Instance Attribute Details
#optional ⇒ Boolean
88
89
90
|
# File 'lib/raml/node.rb', line 88
def optional
@optional
end
|
Instance Method Details
#_regexp_property ⇒ Object
82
|
# File 'lib/raml/node.rb', line 82
def _regexp_property ; self.class._regexp_property ; end
|
#non_scalar_properties ⇒ Object
80
|
# File 'lib/raml/node.rb', line 80
def non_scalar_properties; self.class.non_scalar_properties; end
|
#scalar_properties ⇒ Object
78
|
# File 'lib/raml/node.rb', line 78
def scalar_properties ; self.class.scalar_properties ; end
|