Class: Headhunter::LocalResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/headhunter/css_validator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(body) ⇒ LocalResponse



8
9
10
11
# File 'lib/headhunter/css_validator.rb', line 8

def initialize(body)
  @body = body
  @headers = {'x-w3c-validator-status' => valid?(body)}
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



6
7
8
# File 'lib/headhunter/css_validator.rb', line 6

def body
  @body
end

Instance Method Details

#[](key) ⇒ Object



13
14
15
# File 'lib/headhunter/css_validator.rb', line 13

def [](key)
  @headers[key]
end