Class: Lookout::Diff::Formats::Hash

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/lookout/diff/formats/hash.rb

Defined Under Namespace

Classes: Operation

Instance Method Summary collapse

Constructor Details

#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

#eachObject



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