Class: Alki::Loader::Entry

Inherits:
Object
  • Object
show all
Defined in:
lib/alki/loader/entry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, data) ⇒ Entry

Returns a new instance of Entry.



7
8
9
10
# File 'lib/alki/loader/entry.rb', line 7

def initialize(path,data)
  @path = path.chomp('/')
  @data = data
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



5
6
7
# File 'lib/alki/loader/entry.rb', line 5

def data
  @data
end

#pathObject (readonly)

Returns the value of attribute path.



4
5
6
# File 'lib/alki/loader/entry.rb', line 4

def path
  @path
end

Instance Method Details

#build(blk) ⇒ Object



16
17
18
# File 'lib/alki/loader/entry.rb', line 16

def build(blk)
  Alki::Support.load_class(@builder).build @data, &blk
end

#nameObject



12
13
14
# File 'lib/alki/loader/entry.rb', line 12

def name
  @data[:name]
end