Class: Odin::Types::OdinDiff
- Inherits:
-
Object
- Object
- Odin::Types::OdinDiff
- Defined in:
- lib/odin/types/diff.rb
Instance Attribute Summary collapse
-
#added ⇒ Object
readonly
Returns the value of attribute added.
-
#changed ⇒ Object
readonly
Returns the value of attribute changed.
-
#moved ⇒ Object
readonly
Returns the value of attribute moved.
-
#removed ⇒ Object
readonly
Returns the value of attribute removed.
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize(added: [], removed: [], changed: [], moved: []) ⇒ OdinDiff
constructor
A new instance of OdinDiff.
Constructor Details
#initialize(added: [], removed: [], changed: [], moved: []) ⇒ OdinDiff
Returns a new instance of OdinDiff.
76 77 78 79 80 81 82 |
# File 'lib/odin/types/diff.rb', line 76 def initialize(added: [], removed: [], changed: [], moved: []) @added = added.freeze @removed = removed.freeze @changed = changed.freeze @moved = moved.freeze freeze end |
Instance Attribute Details
#added ⇒ Object (readonly)
Returns the value of attribute added.
74 75 76 |
# File 'lib/odin/types/diff.rb', line 74 def added @added end |
#changed ⇒ Object (readonly)
Returns the value of attribute changed.
74 75 76 |
# File 'lib/odin/types/diff.rb', line 74 def changed @changed end |
#moved ⇒ Object (readonly)
Returns the value of attribute moved.
74 75 76 |
# File 'lib/odin/types/diff.rb', line 74 def moved @moved end |
#removed ⇒ Object (readonly)
Returns the value of attribute removed.
74 75 76 |
# File 'lib/odin/types/diff.rb', line 74 def removed @removed end |
Instance Method Details
#empty? ⇒ Boolean
84 85 86 |
# File 'lib/odin/types/diff.rb', line 84 def empty? added.empty? && removed.empty? && changed.empty? && moved.empty? end |