hyakunin-issyu 0.0.8 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/hyakunin-issyu/version.rb +1 -1
- data/lib/hyakunin-issyu.rb +12 -15
- metadata +2 -2
data/lib/hyakunin-issyu.rb
CHANGED
@@ -1,23 +1,20 @@
|
|
1
1
|
#encoding: utf-8
|
2
2
|
require 'hyakunin-issyu/version'
|
3
|
-
require 'yaml'
|
4
|
-
path = Dir.pwd + '/vendor/bundle/ruby/1.9.1/gems/hyakunin-issyu-0.0.8/lib/hyakunin-issyu/data.yml'
|
5
|
-
|
3
|
+
require 'yaml'
|
4
|
+
# path = Dir.pwd + '/vendor/bundle/ruby/1.9.1/gems/hyakunin-issyu-0.0.8/lib/hyakunin-issyu/data.yml'
|
5
|
+
path = 'lib/hyakunin-issyu/data.yml'
|
6
|
+
@data_set = YAML.load_file(path)
|
6
7
|
|
7
8
|
module HyakuninIssyu
|
8
|
-
def
|
9
|
-
|
10
|
-
for i in start..last do
|
11
|
-
new_data[i] = @data[i]
|
12
|
-
end
|
13
|
-
return new_data
|
9
|
+
def initialize
|
10
|
+
HyakuninIssyu.const_set("SONGS", @data_set)
|
14
11
|
end
|
15
12
|
|
16
|
-
|
17
|
-
@
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
13
|
+
def songs(id_from, id_to)
|
14
|
+
@songs = Array.new
|
15
|
+
for i in id_from..id_to
|
16
|
+
song = HyakuninIssyu.const_get("SONGS")
|
17
|
+
@songs[i] = song[i]
|
18
|
+
end
|
22
19
|
end
|
23
20
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hyakunin-issyu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-18 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: This Gem offer all the information about Hyakunin-issyu, the One Hundred
|
15
15
|
Poems by One Hundred Poets.
|