Class: DeeperHash::ColorDiff
- Inherits:
-
Object
- Object
- DeeperHash::ColorDiff
- Defined in:
- lib/deeper_hash/color_diff.rb
Constant Summary collapse
- INDENT_SIZE =
2
Instance Method Summary collapse
- #draw(color_opts = {}) ⇒ Object
-
#initialize(h1, h2) ⇒ ColorDiff
constructor
A new instance of ColorDiff.
Constructor Details
Instance Method Details
#draw(color_opts = {}) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/deeper_hash/color_diff.rb', line 12 def draw(color_opts = {}) @color_opts = { added: { fg: :gui114 }, removed: { fg: :gui161 }, changed: { fg: :gui105 }, content: { fg: :gui241 } }.merge(color_opts) @use_indent = true @indent = 0 @result_str = "" draw_hash_diff(@diff) @indent = 0 @result_str end |