Skip to content

Commit

Permalink
supress rubocop warning
Browse files Browse the repository at this point in the history
* add config option
* remove ReVIEW::Book::FormatRef class; this class seems to be never called
  • Loading branch information
takahashim committed Aug 13, 2016
1 parent c768374 commit d5f69f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 22 deletions.
6 changes: 6 additions & 0 deletions .rubocop.yml
Expand Up @@ -61,6 +61,12 @@ Performance/RedundantMerge:
Style/ZeroLengthPredicate:
Enabled: false

Style/NumericPredicate:
Enabled: false

Style/TernaryParentheses:
Enabled: false

##################### Metrics ##################################

Metrics/ClassLength:
Expand Down
22 changes: 0 additions & 22 deletions lib/review/book/index.rb
Expand Up @@ -239,28 +239,6 @@ def IconIndex.parse(src, *args)
end
end

class FormatRef
def initialize(locale, index)
@locale = locale
@index = index
end

def title(id)
sprintf(@locale["#{@index.item_type}_caption_format".to_sym],
@index.title(id))
end

def number(id)
sprintf(@locale["#{@index.item_type}_number_format".to_sym],
@index.number(id))
end

def method_missing(mid, *args, &block)
super unless @index.respond_to?(mid)
@index.__send__(mid, *args, &block)
end
end

class BibpaperIndex < Index
Item = Struct.new(:id, :number, :caption)

Expand Down

0 comments on commit d5f69f2

Please sign in to comment.