Sha256: 9cb5b8db56aec0e4b7ad855ebc63b5c208cbd48561fe6eea0dcc5ae455e57aab

Contents?: true

Size: 372 Bytes

Versions: 14

Compression:

Stored size: 372 Bytes

Contents

module NcodeSyosetu
  module Model
    class Novel
      attr_accessor :toc, :episodes

      def initialize(toc, episodes)
        @toc = toc
        @episodes = episodes
      end

      [:title, :author, :abstract, :url].each do |method|
        class_eval <<-EOS
          def #{method}
            @toc.#{method}
          end
        EOS
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
ncode-syosetu-core-0.2.3 lib/ncode_syosetu/model/novel.rb
ncode-syosetu-core-0.2.2 lib/ncode_syosetu/model/novel.rb
ncode-syosetu-core-0.2.1 lib/ncode_syosetu/model/novel.rb
ncode-syosetu-core-0.2.0 lib/ncode_syosetu/model/novel.rb
ncode-syosetu-core-0.1.2 lib/ncode_syosetu/model/novel.rb
ncode-syosetu-core-0.1.1 lib/ncode_syosetu/model/novel.rb
ncode-syosetu-core-0.1.0 lib/ncode_syosetu/model/novel.rb
ncode-syosetu-0.0.7 lib/ncode_syosetu/model/novel.rb
ncode-syosetu-0.0.6 lib/ncode_syosetu/model/novel.rb
ncode-syosetu-0.0.5 lib/ncode_syosetu/model/novel.rb
ncode-syosetu-0.0.4 lib/ncode_syosetu/model/novel.rb
ncode-syosetu-0.0.3 lib/ncode_syosetu/model/novel.rb
ncode-syosetu-0.0.2 lib/ncode_syosetu/model/novel.rb
ncode-syosetu-0.0.1 lib/ncode_syosetu/model/novel.rb