Sha256: 466e9cb22e661f82c65b32a21c58a52e7174e8b2acd463d0522a93c107b93bf6
Contents?: true
Size: 628 Bytes
Versions: 1
Compression:
Stored size: 628 Bytes
Contents
#encoding: utf-8 require 'hyakunin-issyu/version' require 'yaml' # path = Rails.root.join("vendor","bundle","ruby","1.9.1","gems","hyakunin-issyu-#{HyakuninIssyu::VERSION}","lib","hyakunin-issyu","data.yml") path = Rails.root + "/vendor/bundle/ruby/1.9.1/gems/hyakunin-issyu-#{HyakuninIssyu::VERSION}/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 return @songs end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hyakunin-issyu-0.1.3 | lib/hyakunin-issyu.rb |