Class: Epuber::Compiler::FileFinders::Imaginary::DirEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/epuber/compiler/file_finders/imaginary.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ DirEntry

Returns a new instance of DirEntry.



18
19
20
21
# File 'lib/epuber/compiler/file_finders/imaginary.rb', line 18

def initialize(name)
  @name    = name
  @entries = {}
end

Instance Attribute Details

#entriesHash<String, String | DirEntry>

Returns:



12
13
14
# File 'lib/epuber/compiler/file_finders/imaginary.rb', line 12

def entries
  @entries
end

#nameString (readonly)

Returns:

  • (String)


16
17
18
# File 'lib/epuber/compiler/file_finders/imaginary.rb', line 16

def name
  @name
end

Instance Method Details

#==(other) ⇒ Object



31
32
33
# File 'lib/epuber/compiler/file_finders/imaginary.rb', line 31

def ==(other)
  name == other.name && entries == other.entries
end

#[](key) ⇒ Object



23
24
25
# File 'lib/epuber/compiler/file_finders/imaginary.rb', line 23

def [](key)
  @entries[key]
end

#[]=(key, value) ⇒ Object



27
28
29
# File 'lib/epuber/compiler/file_finders/imaginary.rb', line 27

def []=(key, value)
  @entries[key] = value
end