#encoding: utf-8 require 'hyakunin-issyu/version' require 'yaml' @data = YAML.load_file('lib/hyakunin-issyu/data.yml') 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