class FakeFlorence::Server
Public Instance Methods
feature()
click to toggle source
# File lib/fake_florence/server.rb, line 16 def feature settings.feature_cache.feature(params[:id]) rescue Errno::ENOENT halt 404 end
jsonhal_for(*path_bits, extra_links: {}) { || ... }
click to toggle source
# File lib/fake_florence/server.rb, line 26 def jsonhal_for(*path_bits, extra_links: {}) { _links: { curies: [], self: { href: url_for(*path_bits) } }.merge(extra_links) }.tap { |doc| doc.merge!(yield) if block_given? }.to_json end
url_for(*path_bits)
click to toggle source
# File lib/fake_florence/server.rb, line 22 def url_for(*path_bits) File.join(Config.base_url, *path_bits) end