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.



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

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

#nameObject (readonly)

Returns the value of attribute name.



14
15
16
# File 'lib/epuber/compiler/file_finders/imaginary.rb', line 14

def name
  @name
end

Instance Method Details

#==(other) ⇒ Object



29
30
31
# File 'lib/epuber/compiler/file_finders/imaginary.rb', line 29

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

#[](key) ⇒ Object



21
22
23
# File 'lib/epuber/compiler/file_finders/imaginary.rb', line 21

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

#[]=(key, value) ⇒ Object



25
26
27
# File 'lib/epuber/compiler/file_finders/imaginary.rb', line 25

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