Class: Orefs::Info

Inherits:
Object
  • Object
show all
Defined in:
lib/orefs/info.rb

Direct Known Subclasses

Dir, File, Link

Constant Summary

NORMAL =

or nil

0
ERROR =
1
REMOTE =
2
LOCAL =
3

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Info) initialize(name)

A new instance of Info



18
19
20
21
22
23
24
25
26
# File 'lib/orefs/info.rb', line 18

def initialize(name)
  @name = name
  @owner = nil
  @group = nil
  @mode = 0
  @mtime = nil
  @master = nil
  @removed = false
end

Instance Attribute Details

- (Object) group

Returns the value of attribute group



12
13
14
# File 'lib/orefs/info.rb', line 12

def group
  @group
end

- (Object) master

Returns the value of attribute master



15
16
17
# File 'lib/orefs/info.rb', line 15

def master
  @master
end

- (Object) mode

Returns the value of attribute mode



13
14
15
# File 'lib/orefs/info.rb', line 13

def mode
  @mode
end

- (Object) mtime

Returns the value of attribute mtime



14
15
16
# File 'lib/orefs/info.rb', line 14

def mtime
  @mtime
end

- (Object) name

Returns the value of attribute name



10
11
12
# File 'lib/orefs/info.rb', line 10

def name
  @name
end

- (Object) owner

Returns the value of attribute owner



11
12
13
# File 'lib/orefs/info.rb', line 11

def owner
  @owner
end

- (Object) removed

Returns the value of attribute removed



16
17
18
# File 'lib/orefs/info.rb', line 16

def removed
  @removed
end

Instance Method Details

- (Boolean) eql?(o) Also known as: ==

Returns:

  • (Boolean)


28
29
30
31
32
33
34
35
36
# File 'lib/orefs/info.rb', line 28

def eql?(o)
  return false unless o.class == self.class
  # don't check master flag
  (@name == o.name &&
   @owner == o.owner &&
   @group == o.group &&
   @mode == o.mode &&
   @removed == o.removed)
end