From 32d16fe1d28eb22900a6fe990fc5217182c780fc Mon Sep 17 00:00:00 2001 From: Masanori Kado Date: Sun, 24 Apr 2016 23:05:14 +0900 Subject: [PATCH] Delete backward compatibility of 'param' [Ref #546] --- lib/review/book/base.rb | 10 ---------- test/test_book.rb | 8 +++----- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/lib/review/book/base.rb b/lib/review/book/base.rb index 1035a49c3..7066a0dc4 100644 --- a/lib/review/book/base.rb +++ b/lib/review/book/base.rb @@ -178,21 +178,11 @@ def config @config ||= Configure.values end - # backward compatible - def param=(param) - @config = param - end - def load_config(filename) new_conf = YAML.load_file(filename) @config.merge!(new_conf) end - # backward compatible - def param - @config - end - def catalog return @catalog if @catalog.present? diff --git a/test/test_book.rb b/test/test_book.rb index d8d3eb680..2b4da4dd8 100644 --- a/test/test_book.rb +++ b/test/test_book.rb @@ -157,16 +157,14 @@ def test_read_bib # backword compatible def test_setParameter book = Book::Base.new(File.dirname(__FILE__)) - book.param = :test - assert_equal :test, book.param # old way - assert_equal :test, book.config # new way + book.config = :test + assert_equal :test, book.config end def test_setConfig book = Book::Base.new(File.dirname(__FILE__)) book.config = :test - assert_equal :test, book.param # old way - assert_equal :test, book.config # new way + assert_equal :test, book.config end def test_parse_chapters