class HyakuninIssyu

Constants

VERSION

Public Class Methods

img_path() click to toggle source
# File lib/HyakuninIssyu.rb, line 10
      def self.img_path
  File.expand_path("../../assets/img", __FILE__)
end
new() click to toggle source
# File lib/HyakuninIssyu.rb, line 5
def initialize
        @@poems = YAML.load_file(File.expand_path(File.join('..', '..', 'assets', 'data', 'poems.yml'), __FILE__))
        @@poets = YAML.load_file(File.expand_path(File.join('..', '..', 'assets', 'data', 'poets.yml'), __FILE__))
end

Public Instance Methods

poem(id=nil) click to toggle source
# File lib/HyakuninIssyu.rb, line 14
def poem(id=nil)
        return false if id.nil? || id<1 || id>100
        poem = Poem.new(id)
end
poems() click to toggle source
# File lib/HyakuninIssyu.rb, line 24
def poems
        poems = Array.new
        for i in 1..100
                poems[i] = Poem.new(i)
        end
        return poems
end
poet(id=nil) click to toggle source
# File lib/HyakuninIssyu.rb, line 19
def poet(id=nil)
        return false if id.nil? || id<1 || id>100
        poet = Poet.new(id)
end
poets() click to toggle source
# File lib/HyakuninIssyu.rb, line 32
def poets
        poets = Array.new
        for i in 1..100
                poets[i] = Poet.new(i)
        end
        return poets
end