Class: Ea::Diff::Change

Inherits:
Struct
  • Object
show all
Defined in:
lib/ea/diff/change.rb

Overview

One structural change between two EA databases.

change is one of: :added, :removed, :renamed, :modified. kind is the collection name (e.g. :packages, :classes). id is the entity's primary key (string or int). name is a human-readable label for the entity.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#changeObject

Returns the value of attribute change

Returns:

  • (Object)

    the current value of change



11
12
13
# File 'lib/ea/diff/change.rb', line 11

def change
  @change
end

#detailsObject

Returns the value of attribute details

Returns:

  • (Object)

    the current value of details



11
12
13
# File 'lib/ea/diff/change.rb', line 11

def details
  @details
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



11
12
13
# File 'lib/ea/diff/change.rb', line 11

def id
  @id
end

#kindObject

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



11
12
13
# File 'lib/ea/diff/change.rb', line 11

def kind
  @kind
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



11
12
13
# File 'lib/ea/diff/change.rb', line 11

def name
  @name
end

Instance Method Details

#added?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/ea/diff/change.rb', line 13

def added?
  change == :added
end

#modified?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/ea/diff/change.rb', line 25

def modified?
  change == :modified
end

#removed?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/ea/diff/change.rb', line 17

def removed?
  change == :removed
end

#renamed?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/ea/diff/change.rb', line 21

def renamed?
  change == :renamed
end