Sha256: 482b567b5cb9857890b039baab634c1096e99fe39c64d8c40cbbc2dd6951e9ba
Contents?: true
Size: 784 Bytes
Versions: 546
Compression:
Stored size: 784 Bytes
Contents
module Seahorse module Model class Api def initialize @metadata = {} @operations = {} end # @return [String, nil] attr_accessor :version # @return [Hash] attr_accessor :metadata def operations(&block) if block_given? @operations.each(&block) else @operations.enum_for(:each) end end def operation(name) if @operations.key?(name.to_sym) @operations[name.to_sym] else raise ArgumentError, "unknown operation #{name.inspect}" end end def operation_names @operations.keys end def add_operation(name, operation) @operations[name.to_sym] = operation end end end end
Version data entries
546 entries across 546 versions & 2 rubygems