Skip to content

Commit

Permalink
Merge pull request #594 from kdmsnr/delete-backward-compatibility-of-…
Browse files Browse the repository at this point in the history
…base

Delete backward compatibility of 'param' [Ref #546]
  • Loading branch information
takahashim committed Apr 24, 2016
2 parents dcdca39 + 32d16fe commit 039ae57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
10 changes: 0 additions & 10 deletions lib/review/book/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?

Expand Down
8 changes: 3 additions & 5 deletions test/test_book.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 039ae57

Please sign in to comment.