Class: Oga::XML::Element

Inherits:
Object
  • Object
show all
Defined in:
lib/monkey_patch/oga_document.rb

Instance Method Summary collapse

Instance Method Details

#langObject



4
5
6
# File 'lib/monkey_patch/oga_document.rb', line 4

def lang
  get('lang')
end

#lang=(lang) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'lib/monkey_patch/oga_document.rb', line 8

def lang=(lang)
  if lang
    set('lang', lang)
    set('xml:lang', lang) if attribute('xml:lang')
  else
    unset('lang')
    unset('xml:lang')
  end
end