Class: Cfoo::Module

Inherits:
Object show all
Defined in:
lib/cfoo/module.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dir, file_system) ⇒ Module

Returns a new instance of Module.



5
6
7
# File 'lib/cfoo/module.rb', line 5

def initialize(dir, file_system)
    @dir, @file_system = dir, file_system
end

Instance Attribute Details

#dirObject (readonly)

Returns the value of attribute dir.



3
4
5
# File 'lib/cfoo/module.rb', line 3

def dir
  @dir
end

Instance Method Details

#==(other) ⇒ Object



13
14
15
# File 'lib/cfoo/module.rb', line 13

def ==(other)
    eql? other
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/cfoo/module.rb', line 17

def eql?(other)
    dir = other.dir
end

#filesObject



9
10
11
# File 'lib/cfoo/module.rb', line 9

def files
    @file_system.glob_relative("#{dir}/*.yml")
end