class Nucleo::Models::CheckJS

Public Class Methods

check_js(url) click to toggle source
# File lib/nucleo/models/check_js.rb, line 14
def self.check_js(url)
  response_body = Nucleo::Requests::CheckJS.retrieve({url: url})

  self.new(response_body)
end
new(attributes={}) click to toggle source

Returns an instanc eof the Site Feed domain model

@param attributes [Hash]

@return [Nucleo::Models::SiteFeed]

# File lib/nucleo/models/check_js.rb, line 10
def initialize(attributes={})
  @attributes = attributes
end

Public Instance Methods

body?() click to toggle source
# File lib/nucleo/models/check_js.rb, line 20
def body?
  @attributes.fetch("body")
end
head?() click to toggle source
# File lib/nucleo/models/check_js.rb, line 24
def head?
  @attributes.fetch("head")
end
installed?() click to toggle source
# File lib/nucleo/models/check_js.rb, line 32
def installed?
  @attributes.fetch("installed")
end
installed_correctly?() click to toggle source
# File lib/nucleo/models/check_js.rb, line 36
def installed_correctly?
  self.head? and not (self.body? or self.other?)
end
other?() click to toggle source
# File lib/nucleo/models/check_js.rb, line 28
def other?
  @attributes.fetch("other")
end