class Workspace::File

Public Instance Methods

read_erb(options = {}) click to toggle source
# File workspace-parse.rb, line 21
def read_erb(options = {})
  ERB.new(::File.read(to_s)).result(OpenStruct.new(options).instance_eval { binding })
end
read_haml(options = {}) click to toggle source
# File workspace-parse.rb, line 16
def read_haml(options = {})
  engine = Haml::Engine.new(read)
  engine.render(Object.new, options)
end
read_json() click to toggle source
# File workspace-parse.rb, line 8
def read_json
  JSON.parse(read)
end
read_yaml() click to toggle source
# File workspace-parse.rb, line 12
def read_yaml
  Psych.load_file(to_s)
end