Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Project
- class << self
- def load(project); new(project);
- end
- def all
- _projects = []
- Dir[Merb.root + "/config/projects/*.yml"].each { |f| _projects << File.basename(f, '.yml') }
- _projects
- end
- end
- def initialize(project); @project = YAML::load_file(File.join(Merb.root, 'config', 'projects', "#{project.to_s}.yml"));
- end
- def website; @project['website']
- end
- def title; @project['title']
- end
- def summary; @project['summary'];
- end
- def timeframe; @project['timeframe'];
- end
- end
Add Comment
Please, Sign In to add comment