#encoding: utf-8 require 'hyakunin-issyu/version' require 'yaml' path = Dir.pwd + '/vendor/bundle/ruby/1.9.1/gems/hyakunin-issyu-0.0.6/lib/hyakunin-issyu/data.yml' @data = YAML.load_file(path) module HyakuninIssyu def songs(start=1,last=1) new_data = Hash.new for i in start..last do new_data[i] = @data[i] end return new_data end module_function :songs def poem(id=1) @data[id]['poem'] end module_function :poem def poet(id=1) @data[id]['poet'] end module_function :poet end