Class: CapybaraPageObject::Image

Inherits:
Base
  • Object
show all
Defined in:
lib/image.rb

Instance Attribute Summary

Attributes inherited from Base

#source

Instance Method Summary collapse

Methods inherited from Base

#initialize, #path, #prefix, #visit

Methods included from Extractors::PageLevel

#forms, #meta_description, #meta_keywords, #tables, #title

Methods included from Extractors::Common

#all, #data, #extract, #find

Constructor Details

This class inherits a constructor from CapybaraPageObject::Base

Instance Method Details

#altObject



9
10
11
# File 'lib/image.rb', line 9

def alt
  source.find('img')[:alt].strip
end

#srcObject



5
6
7
# File 'lib/image.rb', line 5

def src
  source.find('img')[:src]
end