Class: Trax::Core::FS::Files

Inherits:
SimpleDelegator
  • Object
show all
Includes:
Enumerable, Scopes
Defined in:
lib/trax/core/fs.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Scopes

#by_extension

Methods included from Enumerable

#group_by_count

Constructor Details

#initialize(*args) ⇒ Files

Returns a new instance of Files.



39
40
41
# File 'lib/trax/core/fs.rb', line 39

def initialize(*args)
  @files = (args || []).flatten.compact.uniq
end

Instance Attribute Details

#filesObject

Returns the value of attribute files.



37
38
39
# File 'lib/trax/core/fs.rb', line 37

def files
  @files
end

Instance Method Details

#__getobj__Object



43
44
45
# File 'lib/trax/core/fs.rb', line 43

def __getobj__
  @files
end

#each(&block) ⇒ Object



47
48
49
50
51
# File 'lib/trax/core/fs.rb', line 47

def each(&block)
  @files.each do |file|
    block.call(file)
  end
end