Class: Alki::Loader::Entry
- Inherits:
-
Object
- Object
- Alki::Loader::Entry
- Defined in:
- lib/alki/loader/entry.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #build(blk) ⇒ Object
-
#initialize(path, data) ⇒ Entry
constructor
A new instance of Entry.
- #name ⇒ Object
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
#data ⇒ Object (readonly)
Returns the value of attribute data.
5 6 7 |
# File 'lib/alki/loader/entry.rb', line 5 def data @data end |
#path ⇒ Object (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 |
#name ⇒ Object
12 13 14 |
# File 'lib/alki/loader/entry.rb', line 12 def name @data[:name] end |