class Lurker::JamlDescriptor

file encoded in YAML readed as dumped JSON to hack `open('…json').read`

Public Class Methods

new(uri) click to toggle source
# File lib/lurker/jaml_descriptor.rb, line 13
def initialize(uri)
  @uri = uri.gsub(/\#$/, '').gsub(/\.json/, '.json.yml')
  @fd = open(@uri)
end

Public Instance Methods

read() click to toggle source
# File lib/lurker/jaml_descriptor.rb, line 18
def read
  @read ||= JSON.dump(YAML.load(@fd.read))
end