class GoogleMobileFriendly::TestPage
Attributes
response[R]
Public Class Methods
new(api_response)
click to toggle source
# File lib/google_mobile_friendly/test_page.rb, line 5 def initialize api_response @response = api_response raise @response[:error][:message] unless @response[:error].nil? GoogleMobileFriendly::ResponseData::TestStatus.raise_if_response_is_bad @response end
Public Instance Methods
is_mobile_friendly?()
click to toggle source
# File lib/google_mobile_friendly/test_page.rb, line 11 def is_mobile_friendly? @response[:mobileFriendliness] == GoogleMobileFriendly::ResponseData::RunMobileFriendlyTestResponse.mobile_friendly end
list_of_blocked_resources()
click to toggle source
# File lib/google_mobile_friendly/test_page.rb, line 19 def list_of_blocked_resources GoogleMobileFriendly::ResponseData::ResourceIssue.get_blocked_resources_issues_urls @response end
list_of_mobile_issues()
click to toggle source
# File lib/google_mobile_friendly/test_page.rb, line 15 def list_of_mobile_issues GoogleMobileFriendly::ResponseData::MobileFriendlyIssue.get_user_friendly_issues @response end