Class: GoogleMobileFriendly::ResponseData::MobileFriendlyIssue

Inherits:
Object
  • Object
show all
Defined in:
lib/google_mobile_friendly/response_data/mobile_friendly_issue.rb

Constant Summary collapse

MOBILE_FRIENDLY_RULE_UNSPECIFIED =
"Unknown rule. Sorry, we don't have any description for the rule that was\nbroken."
USES_INCOMPATIBLE_PLUGINS =
"Plugins incompatible with mobile devices are being used. [Learn more]\n(https://support.google.com/webmasters/answer/6352293#flash_usage)."
CONFIGURE_VIEWPORT =
"Viewsport is not specified using the meta viewport tag. [Learn more]\n(https://support.google.com/webmasters/answer/6352293#viewport_not_configured)."
FIXED_WIDTH_VIEWPORT =
"Viewport defined to a fixed width. [Learn more]\n(https://support.google.com/webmasters/answer/6352293#fixed-width_viewport)."
SIZE_CONTENT_TO_VIEWPORT =
"Content not sized to viewport. [Learn more]\n(https://support.google.com/webmasters/answer/6352293#content_not_sized_to_viewport)."
USE_LEGIBLE_FONT_SIZES =
"Font size is too small for easy reading on a small screen. [Learn More]\n(https://support.google.com/webmasters/answer/6352293#small_font_size)."
TAP_TARGETS_TOO_CLOSE =
"Touch elements are too close to each other. [Learn more]\n(https://support.google.com/webmasters/answer/6352293#touch_elements_too_close)."

Class Method Summary collapse

Class Method Details

.get_user_friendly_issues(response) ⇒ Object



12
13
14
15
16
# File 'lib/google_mobile_friendly/response_data/mobile_friendly_issue.rb', line 12

def self.get_user_friendly_issues response
  response[:mobileFriendlyIssues].map do |issue|
    self.const_get issue[:rule]
  end unless response[:mobileFriendlyIssues].nil?
end