#encoding: utf-8 require 'hyakunin-issyu/version' require 'yaml' # path = Dir.pwd + '/vendor/bundle/ruby/1.9.1/gems/hyakunin-issyu-0.0.8/lib/hyakunin-issyu/data.yml' path = 'lib/hyakunin-issyu/data.yml' @data_set = YAML.load_file(path) module HyakuninIssyu def initialize HyakuninIssyu.const_set("SONGS", @data_set) end def songs(id_from, id_to) @songs = Array.new for i in id_from..id_to song = HyakuninIssyu.const_get("SONGS") @songs[i] = song[i] end end end