Class: Lookout::Diff::Formats::Hash
- Includes:
- Enumerable
- Defined in:
- lib/lookout/diff/formats/hash.rb
Defined Under Namespace
Classes: Operation
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(operations) ⇒ Hash
constructor
A new instance of Hash.
Constructor Details
permalink #initialize(operations) ⇒ Hash
Returns a new instance of Hash.
6 7 8 |
# File 'lib/lookout/diff/formats/hash.rb', line 6 def initialize(operations) @operations = operations end |
Instance Method Details
permalink #each ⇒ Object
[View source]
10 11 12 13 14 15 |
# File 'lib/lookout/diff/formats/hash.rb', line 10 def each @operations.each do |op| operation = Operation.new(op) yield operation.to_s unless operation.empty? end end |