Class: Schema

Inherits:
Object
  • Object
show all
Defined in:
lib/updateagent/schema.rb

Instance Method Summary collapse

Constructor Details

#initialize(resource) ⇒ Schema

Returns a new instance of Schema.



2
3
4
# File 'lib/updateagent/schema.rb', line 2

def initialize(resource)
  @schema = resource.get(:schema)
end

Instance Method Details

#type(t) ⇒ Object



5
6
7
# File 'lib/updateagent/schema.rb', line 5

def type(t)
  @schema.select { |c| c['type'] == t }.map { |c| c['name'] }.uniq
end