Class: DotDiff::ElementMeta

Inherits:
Object
  • Object
show all
Defined in:
lib/dotdiff/element_meta.rb

Defined Under Namespace

Classes: Rectangle

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(page, element) ⇒ ElementMeta

Returns a new instance of ElementMeta.



7
8
9
10
# File 'lib/dotdiff/element_meta.rb', line 7

def initialize(page, element)
  @element_xpath = element.path
  @page = page
end

Instance Attribute Details

#element_xpathObject (readonly)

Returns the value of attribute element_xpath.



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

def element_xpath
  @element_xpath
end

#pageObject (readonly)

Returns the value of attribute page.



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

def page
  @page
end

Instance Method Details

#rectangleObject



12
13
14
# File 'lib/dotdiff/element_meta.rb', line 12

def rectangle
  @rectangle ||= Rectangle.new(@page, @element_xpath)
end