Skip to content

Commit

Permalink
Prefer alias_method over alias
Browse files Browse the repository at this point in the history
Appease the Rubocop gods.

Change-Id: Icdc7568cc5dc79b6c0bc14a3f4e5c77db89f87a1
Reviewed-on: http://gerrit.causes.com/36711
Tested-by: jenkins <[email protected]>
Reviewed-by: Shane da Silva <[email protected]>
  • Loading branch information
sds authored and Shane da Silva committed Mar 29, 2014
1 parent 6071d47 commit 6340d41
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion lib/scss_lint/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def initialize(options)
def ==(other)
super || @options == other.options
end
alias :eql? :==
alias_method :eql?, :==

def enabled_linters
LinterRegistry.extract_linters_from(@options['linters'].keys).select do |linter|
Expand Down
38 changes: 19 additions & 19 deletions lib/scss_lint/linter/indentation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,26 +44,26 @@ def visit_if(node, &block)
end

# Define node types that increase indentation level
alias :visit_directive :check_and_visit_children
alias :visit_each :check_and_visit_children
alias :visit_for :check_and_visit_children
alias :visit_function :check_and_visit_children
alias :visit_media :check_and_visit_children
alias :visit_mixin :check_and_visit_children
alias :visit_mixindef :check_and_visit_children
alias :visit_prop :check_and_visit_children
alias :visit_rule :check_and_visit_children
alias :visit_supports :check_and_visit_children
alias :visit_while :check_and_visit_children
alias_method :visit_directive, :check_and_visit_children
alias_method :visit_each, :check_and_visit_children
alias_method :visit_for, :check_and_visit_children
alias_method :visit_function, :check_and_visit_children
alias_method :visit_media, :check_and_visit_children
alias_method :visit_mixin, :check_and_visit_children
alias_method :visit_mixindef, :check_and_visit_children
alias_method :visit_prop, :check_and_visit_children
alias_method :visit_rule, :check_and_visit_children
alias_method :visit_supports, :check_and_visit_children
alias_method :visit_while, :check_and_visit_children

# Define node types to check indentation of (notice comments are left out)
alias :visit_charset :check_indentation
alias :visit_content :check_indentation
alias :visit_cssimport :check_indentation
alias :visit_extend :check_indentation
alias :visit_import :check_indentation
alias :visit_return :check_indentation
alias :visit_variable :check_indentation
alias :visit_warn :check_indentation
alias_method :visit_charset, :check_indentation
alias_method :visit_content, :check_indentation
alias_method :visit_cssimport, :check_indentation
alias_method :visit_extend, :check_indentation
alias_method :visit_import, :check_indentation
alias_method :visit_return, :check_indentation
alias_method :visit_variable, :check_indentation
alias_method :visit_warn, :check_indentation
end
end

0 comments on commit 6340d41

Please sign in to comment.