Class: VersionChange

Inherits:
Struct
  • Object
show all
Defined in:
app/models/version_change.rb

Overview

Informations

License

Ekylibre - Simple agricultural ERP Copyright (C) 2008-2009 Brice Texier, Thibaud Merigon Copyright (C) 2010-2012 Brice Texier Copyright (C) 2012-2014 Brice Texier, David Joulin

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see www.gnu.org/licenses.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attributeObject

Returns the value of attribute attribute

Returns:

  • (Object)

    the current value of attribute


23
24
25
# File 'app/models/version_change.rb', line 23

def attribute
  @attribute
end

#new_valueObject

Returns the value of attribute new_value

Returns:

  • (Object)

    the current value of new_value


23
24
25
# File 'app/models/version_change.rb', line 23

def new_value
  @new_value
end

#old_valueObject

Returns the value of attribute old_value

Returns:

  • (Object)

    the current value of old_value


23
24
25
# File 'app/models/version_change.rb', line 23

def old_value
  @old_value
end

#versionObject

Returns the value of attribute version

Returns:

  • (Object)

    the current value of version


23
24
25
# File 'app/models/version_change.rb', line 23

def version
  @version
end

Instance Method Details

#human_attribute_nameObject


24
25
26
# File 'app/models/version_change.rb', line 24

def human_attribute_name
  version.item.class.human_attribute_name(attribute)
end

#human_new_valueObject


32
33
34
# File 'app/models/version_change.rb', line 32

def human_new_value
  human_value(new_value)
end

#human_old_valueObject


28
29
30
# File 'app/models/version_change.rb', line 28

def human_old_value
  human_value(old_value)
end