module Schai

Constants

VERSION

Public Class Methods

current_parsing_file?(path) click to toggle source
# File lib/schai.rb, line 18
def self.current_parsing_file? path
  File.expand_path("../#{path}", Schai.path.last) == Schai.path.last
end
parse(params) click to toggle source
# File lib/schai.rb, line 10
def self.parse params
  JsRoot.parse params
end
parse_file(path) click to toggle source
# File lib/schai.rb, line 22
def self.parse_file path
  if Schai.path.empty?
    Schai.path << path
    ret = parse YAML.load_file(path)
    Schai.path.pop
  else
    expand_path = File.expand_path("../#{path}", Schai.path.last)
    Schai.path << expand_path
    ret = parse YAML.load_file(expand_path)
    Schai.path.pop
  end
  ret
end
path() click to toggle source
# File lib/schai.rb, line 14
def self.path
  @@path ||=[]
end