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.



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

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

Instance Attribute Details

#entriesHash<String, String | DirEntry>

Returns:



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

def entries
  @entries
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

Instance Method Details

#==(other) ⇒ Object



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

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

#[](key) ⇒ Object



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

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

#[]=(key, value) ⇒ Object



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

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