lib/merit/rule.rb
def badge
      if @badge.nil?
        badges = Badge.by_name(badge_name)
        badges = badges.by_level(level) unless level.nil?
        @badge = badges.first
      end
      @badge
    end
# Get rule's related Badge.
Get rule's related Badge.
Get rule ' s related Badge .
def badge
      if @badge.nil?
        badges = Badge.by_name(badge_name)
        badges = badges.by_level(level) unless level.nil?
        @badge = badges.first
      end
      @badge
    end
def badge if @badge . nil? badges = Badge . by_name ( badge_name ) badges = badges . by_level ( level ) unless level . nil? @badge = badges . first end @badge end
Get rule's related Badge.
Get rule ' s related Badge .