-
-
Save nuheluxulu/dd89a5551b2071795b663137ae3a8f10 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def initialize(**opts) | |
@list_type = opts[:list_type] || 'ALL' | |
@search_term = opts[:search_term] || '' | |
begin | |
@page = Integer(opts[:page]) | |
rescue ArgumentError | |
@page = 1 | |
end | |
begin | |
@page_size = Integer(opts[:page_size]) | |
rescue ArgumentError | |
@page_size = 20 | |
end | |
begin | |
@page_size = Integer(opts[:page_size]) | |
rescue ArgumentError | |
@page_size = 20 | |
end | |
@sort_by = opts[:sort_by] || '' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C: Metrics/CyclomaticComplexity: Cyclomatic complexity for initialize is too high. [7/6] | |
C: Metrics/MethodLength: Method has too many lines. [18/10] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment