Class: Fuzz::DirObject

Inherits:
Object
  • Object
show all
Defined in:
lib/fuzz/fzzr.rb

Overview

Fzzr

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ DirObject

Returns a new instance of DirObject.



86
87
88
89
90
91
# File 'lib/fuzz/fzzr.rb', line 86

def initialize(path)
  @path = path
  @fullpath = File.expand_path(path)
  @name = File.basename(path)
  @ext = File.extname(path).sub(/^\./,'')
end

Instance Attribute Details

#extObject (readonly)

Returns the value of attribute ext.



85
86
87
# File 'lib/fuzz/fzzr.rb', line 85

def ext
  @ext
end

#fullpathObject (readonly)

Returns the value of attribute fullpath.



85
86
87
# File 'lib/fuzz/fzzr.rb', line 85

def fullpath
  @fullpath
end

#nameObject (readonly)

Returns the value of attribute name.



85
86
87
# File 'lib/fuzz/fzzr.rb', line 85

def name
  @name
end

#pathObject (readonly)

Returns the value of attribute path.



85
86
87
# File 'lib/fuzz/fzzr.rb', line 85

def path
  @path
end

Instance Method Details

#changed?Boolean

Returns:

  • (Boolean)


93
94
95
# File 'lib/fuzz/fzzr.rb', line 93

def changed?
  false
end

#iterate(fzzr_id, &block) ⇒ Object



97
98
99
100
# File 'lib/fuzz/fzzr.rb', line 97

def iterate(fzzr_id, &block)
  # nothing to iterate over
  true
end

#to_sObject



102
103
104
# File 'lib/fuzz/fzzr.rb', line 102

def to_s
  "Dir:#{path}"
end