Sha256: d85a76ed5d99b3100a73ad6444581e6e9c3bbf71b2ee14aeeccbe4a124c5fcc8
Contents?: true
Size: 522 Bytes
Versions: 15
Compression:
Stored size: 522 Bytes
Contents
module GraphitiGraphQL module GraphitiSchema class Wrapper attr_reader :schema def initialize(schema) @schema = schema end def get_resource(name) config = schema[:resources].find { |r| r[:name] == name } raise "Could not find resource #{name} in schema" unless config Resource.new(self, schema[:resources].find { |r| r[:name] == name }) end def resources schema[:resources].map { |r| get_resource(r[:name]) } end end end end
Version data entries
15 entries across 15 versions & 1 rubygems