97a2c496119c93df2d89f814ac133cb63aa2ce94
Dev Refactoring. Adding pkg mgmt.

Dev authored 7 years ago

1) module RCM
2)   class Package
Dev Converging the state as def...

Dev authored 7 years ago

3)     attr_accessor :name, :version, :state, :changed
Dev Refactoring. Adding pkg mgmt.

Dev authored 7 years ago

4) 
5)     # Public state constants
6)     INSTALLED = 'installed'.freeze
7)     REMOVED = 'removed'.freeze
8) 
9)     def ==(other)
10)       return false unless other.is_a?(RCM::Package)
11) 
12)       @name == other.name &&
13)       @version == other.version &&
14)       @state == other.state
15)     end
16) 
17)     def initialize(name, version, state)
18)       @name = name
19)       @version = version
20)       @state = state
Dev Converging the state as def...

Dev authored 7 years ago

21)       @changed = false
Dev Refactoring. Adding pkg mgmt.

Dev authored 7 years ago

22)     end
23) 
24)     def to_s
25)       "Name = #{@name}\n" +
26)       "Version = #{@version}\n" +
Dev Converging the state as def...

Dev authored 7 years ago

27)       "State = #{@state}\n" +
28)       "Changed = #{changed}"