class ActiveYaml::Base

Public Class Methods

extension() click to toggle source
# File lib/active_yaml/base.rb, line 16
def extension
  "yml"
end
load_file() click to toggle source
# File lib/active_yaml/base.rb, line 8
def load_file
  if (data = raw_data).is_a?(Array)
    data
  elsif data.respond_to?(:values)
    data.values
  end
end

Private Class Methods

load_path(path) click to toggle source
# File lib/active_yaml/base.rb, line 21
def load_path(path)
  YAML.load(ERB.new(File.read(path)).result)
end