class Satisfaction::Schema

Attributes

schemas[RW]

Public Class Methods

new(path = File.join(File.dirname(__FILE__), "../schemas")) click to toggle source
# File lib/satisfaction/schema.rb, line 7
def initialize(path = File.join(File.dirname(__FILE__), "../schemas"))
  @schemas = []
  Dir.entries(path).select {|f| !File.directory? f}.each do |source|
    schema = File.read("#{path}/#{source}")
    @schemas << JSON.parse(schema)
  end
end