Module: ATSPI::Accessible::Text::Hypertext

Included in:
ATSPI::Accessible::Text
Defined in:
lib/atspi/accessible/text/hypertext.rb

Overview

Wraps libatspi’s hypertext interface.

Attributes & States collapse

Instance Method Details

Returns its hyperlinks. Will be an empty array if it is not a hypertext.

Returns:

  • (Array<Hyperlink>)

    its hyperlinks. Will be an empty array if it is not a hypertext.

See Also:



19
20
21
22
23
24
25
# File 'lib/atspi/accessible/text/hypertext.rb', line 19

def hyperlinks
  if hypertext?
    @native.n_links.times.map{ |idx| Hyperlink.new(@native, @native.link(idx)) }
  else
    []
  end
end

#hypertext?true, false

Checks if it is a hypertext.

Returns:

  • (true, false)

See Also:



10
11
12
# File 'lib/atspi/accessible/text/hypertext.rb', line 10

def hypertext?
  not @native.hypertext_iface.nil?
end