Class: Lotus::Config::Mapper Private
- Inherits:
-
Object
- Object
- Lotus::Config::Mapper
- Defined in:
- lib/lotus/config/mapper.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Define a mapping for Lotus::Model
Constant Summary collapse
- EXTNAME =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'.rb'
Instance Method Summary collapse
-
#initialize(root, path, &blk) ⇒ Mapper
constructor
private
A new instance of Mapper.
- #to_proc ⇒ Object private
Constructor Details
#initialize(root, path, &blk) ⇒ Mapper
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Mapper.
12 13 14 15 |
# File 'lib/lotus/config/mapper.rb', line 12 def initialize(root, path, &blk) @path, @blk = path, blk @path = root.join(path) if root && path end |
Instance Method Details
#to_proc ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
17 18 19 20 21 22 |
# File 'lib/lotus/config/mapper.rb', line 17 def to_proc return @blk if @blk code = realpath.read Proc.new { eval(code) } end |