Class: Onde::DirectoryStructure

Inherits:
Object
  • Object
show all
Defined in:
lib/onde.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ DirectoryStructure

Returns a new instance of DirectoryStructure.



68
69
70
71
72
73
74
# File 'lib/onde.rb', line 68

def initialize(data)
  @expanded_paths = {}
  data.map do |node_data|
    node = Onde::Node.new(node_data)
    expand_node(node)
  end
end

Class Method Details

.paths(data) ⇒ Object



64
65
66
# File 'lib/onde.rb', line 64

def self.paths(data)
  self.new(data).to_hash
end

Instance Method Details

#to_hashObject



76
77
78
# File 'lib/onde.rb', line 76

def to_hash
  @expanded_paths
end