Class: Y::Diff
- Inherits:
-
Object
- Object
- Y::Diff
- Defined in:
- lib/y/diff.rb
Overview
A representation of an uniformly-formatted chunk of rich context stored by Text or XmlText. It contains a value (which could be a string, embedded object or another shared type) with optional formatting attributes wrapping around this chunk.
Instance Method Summary collapse
- #attrs ⇒ Hash
- #insert ⇒ Object
-
#to_h ⇒ Hash
Convert the diff to a Hash representation.
- #ydiff_attrs ⇒ Hash
-
#ydiff_insert ⇒ Object
Returns string representation of text.
Instance Method Details
#attrs ⇒ Hash
15 16 17 |
# File 'lib/y/diff.rb', line 15 def attrs ydiff_attrs end |
#insert ⇒ Object
10 11 12 |
# File 'lib/y/diff.rb', line 10 def insert ydiff_insert end |
#to_h ⇒ Hash
Convert the diff to a Hash representation
22 23 24 25 26 27 |
# File 'lib/y/diff.rb', line 22 def to_h { insert: ydiff_insert, attrs: ydiff_attrs } end |
#ydiff_attrs ⇒ Hash
|
# File 'lib/y/diff.rb', line 34
|
#ydiff_insert ⇒ Object
Returns string representation of text
|
# File 'lib/y/diff.rb', line 29
|