module KongSchema::Resource::Upstream
Public Instance Methods
all(*)
click to toggle source
# File lib/kong_schema/resource/upstream.rb, line 21 def all(*) Kong::Upstream.all end
changed?(record, attributes)
click to toggle source
# File lib/kong_schema/resource/upstream.rb, line 33 def changed?(record, attributes) Adapter.for(Kong::Upstream).changed?(record.attributes, attributes) end
creatable?(*)
click to toggle source
# File lib/kong_schema/resource/upstream.rb, line 29 def creatable?(*) true end
create(attributes)
click to toggle source
# File lib/kong_schema/resource/upstream.rb, line 25 def create(attributes) Adapter.for(Kong::Upstream).create(attributes) end
delete(record)
click to toggle source
# File lib/kong_schema/resource/upstream.rb, line 41 def delete(record) Adapter.for(Kong::Upstream).delete(record) end
identify(record)
click to toggle source
# File lib/kong_schema/resource/upstream.rb, line 12 def identify(record) case record when Kong::Upstream record.name when Hash record['name'] end end
update(record, partial_attributes)
click to toggle source
# File lib/kong_schema/resource/upstream.rb, line 37 def update(record, partial_attributes) Adapter.for(Kong::Upstream).update(record, partial_attributes) end