Class: Xliffle::Note
- Inherits:
-
Object
- Object
- Xliffle::Note
- Defined in:
- lib/xliffle/note.rb
Instance Attribute Summary collapse
-
#note ⇒ Object
readonly
Returns the value of attribute note.
-
#priority ⇒ Object
readonly
Returns the value of attribute priority.
Instance Method Summary collapse
-
#initialize(note, options = {}) ⇒ Note
constructor
A new instance of Note.
- #to_xliff(xliff) ⇒ Object
Constructor Details
#initialize(note, options = {}) ⇒ Note
7 8 9 10 |
# File 'lib/xliffle/note.rb', line 7 def initialize(note, = {}) @note = note @priority = [:priority] || 2 end |
Instance Attribute Details
#note ⇒ Object (readonly)
Returns the value of attribute note.
5 6 7 |
# File 'lib/xliffle/note.rb', line 5 def note @note end |
#priority ⇒ Object (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 |