Class: Sfp::Helper::SchemaCollector
- Inherits:
-
Object
- Object
- Sfp::Helper::SchemaCollector
- Defined in:
- lib/sfpagent/helper.rb
Instance Attribute Summary collapse
-
#schemata ⇒ Object
readonly
Returns the value of attribute schemata.
Instance Method Summary collapse
-
#initialize ⇒ SchemaCollector
constructor
A new instance of SchemaCollector.
- #visit(name, value, parent) ⇒ Object
Constructor Details
#initialize ⇒ SchemaCollector
Returns a new instance of SchemaCollector.
97 98 99 |
# File 'lib/sfpagent/helper.rb', line 97 def initialize @schemata = [] end |
Instance Attribute Details
#schemata ⇒ Object (readonly)
Returns the value of attribute schemata.
96 97 98 |
# File 'lib/sfpagent/helper.rb', line 96 def schemata @schemata end |
Instance Method Details
#visit(name, value, parent) ⇒ Object
101 102 103 104 105 106 |
# File 'lib/sfpagent/helper.rb', line 101 def visit(name, value, parent) if value.is_a?(Hash) and value.has_key?('_classes') value['_classes'].each { |s| @schemata << s } end true end |