Sha256: 25229091f6bb27bb7b81a546ca565838694d2e1eabf376c682e20dc5b7611212

Contents?: true

Size: 529 Bytes

Versions: 15

Compression:

Stored size: 529 Bytes

Contents

# $LOAD_PATH << '.' << './lib'
require 'bundler'
Bundler.require

require 'solis'
require 'pp'
require 'json'

Solis::ConfigFile.path = './'
g = Solis::Graph.new(Solis::Shape::Reader::File.read(Solis::ConfigFile[:solis][:shacl]), Solis::ConfigFile[:solis][:env])

schedule = g.shape_as_model('Schedule')
schedule_resource = g.shape_as_resource('Schedule')
puts schedule.model_template.to_json
begin
  s = schedule_resource.find({id: 123})
  pp s.to_jsonapi
rescue Graphiti::Errors::RecordNotFound
  puts "record not found"
end


Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
solis-0.78.0 examples/read_from_shacl.rb
solis-0.77.0 examples/read_from_shacl.rb
solis-0.76.0 examples/read_from_shacl.rb
solis-0.75.0 examples/read_from_shacl.rb
solis-0.74.0 examples/read_from_shacl.rb
solis-0.73.0 examples/read_from_shacl.rb
solis-0.72.0 examples/read_from_shacl.rb
solis-0.71.0 examples/read_from_shacl.rb
solis-0.70.0 examples/read_from_shacl.rb
solis-0.69.0 examples/read_from_shacl.rb
solis-0.68.0 examples/read_from_shacl.rb
solis-0.67.0 examples/read_from_shacl.rb
solis-0.66.0 examples/read_from_shacl.rb
solis-0.65.0 examples/read_from_shacl.rb
solis-0.64.0 examples/read_from_shacl.rb