Class: Sfp::Helper::SchemaCollector

Inherits:
Object
  • Object
show all
Defined in:
lib/sfpagent/helper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSchemaCollector

Returns a new instance of SchemaCollector.



97
98
99
# File 'lib/sfpagent/helper.rb', line 97

def initialize
	@schemata = []
end

Instance Attribute Details

#schemataObject (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