Class: Schema
- Inherits:
-
Object
- Object
- Schema
- Defined in:
- lib/updateagent/schema.rb
Instance Method Summary collapse
-
#initialize(resource) ⇒ Schema
constructor
A new instance of Schema.
- #type(t) ⇒ Object
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 |