Sha256: 07713447d3e46b50aa71100d248704dda2af6c2dc71522e6cfd8a9c458f9cc90
Contents?: true
Size: 1.03 KB
Versions: 14
Compression:
Stored size: 1.03 KB
Contents
require 'haveapi/go_client/utils' module HaveAPI::GoClient class InputOutput include Utils # @return [Action] attr_reader :action # @return [Symbol] attr_reader :role # @return [Symbol] attr_reader :direction # @return [String] attr_reader :layout # @return [String] attr_reader :namespace # @return [Array<Parameter>] attr_reader :parameters # @return [String] attr_reader :go_type # @return [String] attr_reader :go_namespace def initialize(action, role, direction, desc, prefix: nil) @action = action @role = role @direction = direction @layout = desc[:layout] @namespace = desc[:namespace] @parameters = desc[:parameters].map do |k, v| Parameter.new(role, direction, self, k.to_s, v) end.compact.sort! @go_type = action.go_type + (prefix || '') + direction.to_s.capitalize @go_namespace = camelize(desc[:namespace]) end def resolve_associations parameters.each(&:resolve) end end end
Version data entries
14 entries across 14 versions & 1 rubygems