Class: Desmoservice::LigatureEdit
- Inherits:
-
Object
- Object
- Desmoservice::LigatureEdit
- Defined in:
- lib/edition.rb
Instance Method Summary collapse
- #attr(attr_key, values) ⇒ Object
- #family(family_arg) ⇒ Object
-
#initialize(xml) ⇒ LigatureEdit
constructor
A new instance of LigatureEdit.
- #key_prefix(key_prefix_arg) ⇒ Object
- #superior(superior_arg, context_arg = nil) ⇒ Object
- #text(lang, content) ⇒ Object
Constructor Details
#initialize(xml) ⇒ LigatureEdit
Returns a new instance of LigatureEdit.
114 115 116 |
# File 'lib/edition.rb', line 114 def initialize(xml) @xml = xml end |
Instance Method Details
#attr(attr_key, values) ⇒ Object
141 142 143 |
# File 'lib/edition.rb', line 141 def attr(attr_key, values) Edition.attr(@xml, attr_key, values) end |
#family(family_arg) ⇒ Object
133 134 135 |
# File 'lib/edition.rb', line 133 def family(family_arg) Edition.family(@xml, family_arg) end |
#key_prefix(key_prefix_arg) ⇒ Object
145 146 147 |
# File 'lib/edition.rb', line 145 def key_prefix(key_prefix_arg) Edition.key_prefix(@xml, key_prefix_arg) end |
#superior(superior_arg, context_arg = nil) ⇒ Object
118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/edition.rb', line 118 def superior(superior_arg, context_arg=nil) @xml << '<pere' Edition.to_attribute(@xml, superior_arg) if not context_arg.nil? if context_arg.is_a? Integer @xml << ' contexte="' << context_arg.to_s << '"' else index = context_arg.index('/') @xml << ' contexte-grille="' << context_arg[0,index] << '"' @xml << ' contexte-idctxt="' << context_arg[index+1..-1] << '"' end end @xml << '/>' end |
#text(lang, content) ⇒ Object
137 138 139 |
# File 'lib/edition.rb', line 137 def text(lang, content) Edition.text(@xml, lang, content) end |