Class: Xliffle::Note

Inherits:
Object
  • Object
show all
Defined in:
lib/xliffle/note.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(note, options = {}) ⇒ Note



7
8
9
10
# File 'lib/xliffle/note.rb', line 7

def initialize(note, options = {})
  @note = note
  @priority = options[:priority] || 2
end

Instance Attribute Details

#noteObject (readonly)

Returns the value of attribute note.



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

def note
  @note
end

#priorityObject (readonly)

Returns the value of attribute priority.



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

def priority
  @priority
end

Instance Method Details

#to_xliff(xliff) ⇒ Object



12
13
14
# File 'lib/xliffle/note.rb', line 12

def to_xliff(xliff)
  xliff.tag!('note', { priority: @priority }, @note)
end