Class: ODisk::Info

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

Direct Known Subclasses

Dir, File, Link

Constant Summary collapse

NORMAL =

or nil

0
ERROR =
1
REMOTE =
2
LOCAL =
3

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Info

Returns a new instance of Info.



18
19
20
21
22
23
24
25
26
# File 'lib/odisk/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

#groupObject

Returns the value of attribute group.



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

def group
  @group
end

#masterObject

Returns the value of attribute master.



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

def master
  @master
end

#modeObject

Returns the value of attribute mode.



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

def mode
  @mode
end

#mtimeObject

Returns the value of attribute mtime.



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

def mtime
  @mtime
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#ownerObject

Returns the value of attribute owner.



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

def owner
  @owner
end

#removedObject

Returns the value of attribute removed.



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

def removed
  @removed
end

Instance Method Details

#eql?(o) ⇒ Boolean Also known as: ==

Returns:

  • (Boolean)


28
29
30
31
32
33
34
35
36
# File 'lib/odisk/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 || $group_tolerant) &&
   @mode == o.mode &&
   @removed == o.removed)
end