Sha256: 8a7d9be94f6250d3fa6db1e056900a0d8fb87c5f1e8eb0cbd0053d0dde6cc40d
Contents?: true
Size: 776 Bytes
Versions: 10
Compression:
Stored size: 776 Bytes
Contents
module Seahorse module Model class Api < Node property :version, String property :endpoint, String property :metadata, Hash property :plugins, [String] property :documentation, String property :operations, Operations def initialize(*) super self.metadata = {} self.plugins = [] self.operations = Operations.new end def validate! operations.load! true end def to_hash operations.load! hash = super hash.delete('metadata') if hash['metadata'].empty? hash.delete('plugins') if hash['plugins'].empty? hash end def inspect "#<#{self.class.name} version=#{version}>" end end end end
Version data entries
10 entries across 10 versions & 1 rubygems