Class: Moab::FileGroupDifferenceSubset

Inherits:
Serializer::Serializable show all
Includes:
HappyMapper
Defined in:
lib/moab/file_group_difference_subset.rb

Overview

Note:

Copyright © 2012 by The Board of Trustees of the Leland Stanford Junior University. All rights reserved. See LICENSE for details.

A container for reporting a set of file-level differences of the type specified by the change attribute

Data Model

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Serializer::Serializable

#array_to_hash, deep_diff, #diff, #key, #key_name, #summary, #to_hash, #to_json, #to_yaml, #variable_names, #variables

Constructor Details

#initialize(opts = {}) ⇒ FileGroupDifferenceSubset

Returns a new instance of FileGroupDifferenceSubset.



20
21
22
23
# File 'lib/moab/file_group_difference_subset.rb', line 20

def initialize(opts = {})
  @files = []
  super(opts)
end

Instance Attribute Details

#changeString

Returns The type of change (identical|renamed|modified|deleted|added).

Returns:

  • (String)

    The type of change (identical|renamed|modified|deleted|added)



27
# File 'lib/moab/file_group_difference_subset.rb', line 27

attribute :change, String, :key => true

#countInteger

Returns How many files were changed.

Returns:

  • (Integer)

    How many files were changed



31
# File 'lib/moab/file_group_difference_subset.rb', line 31

attribute :count, Integer, :on_save => proc { |n| n.to_s }

#filesArray<FileInstanceDifference>

Returns The set of file instances having this type of change.

Returns:



39
# File 'lib/moab/file_group_difference_subset.rb', line 39

has_many :files, FileInstanceDifference, :tag => 'file'