Module: Riddl::Utils::Turtle
- Defined in:
- lib/ruby/riddl/utils/turtle.rb
Defined Under Namespace
Classes: File, GetQuery, Query, Show
Class Method Summary collapse
Class Method Details
.implementation(tf) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/ruby/riddl/utils/turtle.rb', line 21 def self::implementation(tf) Proc.new do if ::File.mtime(tf.url) > tf.changed tf.data = "" ::File.open(tf.url,"r") do |f| f.each_line do |line| tf.data += line end end tf.changed = ::File.mtime(tf.url) end run Show, tf.data, tf.changed if get run Query, tf.url if get 'query' on resource do run GetQuery, tf.url if get end end end |