Class: Ruar::EntryPoint
- Inherits:
-
Object
- Object
- Ruar::EntryPoint
- Defined in:
- lib/ruar/entrypoint.rb
Instance Method Summary collapse
- #activate ⇒ Object
- #eval(path, eval_bind = TOPLEVEL_BINDING) ⇒ Object
-
#initialize(archive: nil, entry: nil) ⇒ EntryPoint
constructor
A new instance of EntryPoint.
- #read(path) ⇒ Object
Constructor Details
#initialize(archive: nil, entry: nil) ⇒ EntryPoint
Returns a new instance of EntryPoint.
5 6 7 8 |
# File 'lib/ruar/entrypoint.rb', line 5 def initialize(archive: nil, entry: nil) @archive = archive @entry = entry end |
Instance Method Details
#activate ⇒ Object
10 11 12 13 14 |
# File 'lib/ruar/entrypoint.rb', line 10 def activate @access = Ruar::Access.new(@archive) # First eval this file if option[:entry] is set @access.eval(@entry) unless @entry.nil? end |
#eval(path, eval_bind = TOPLEVEL_BINDING) ⇒ Object
16 17 18 |
# File 'lib/ruar/entrypoint.rb', line 16 def eval(path, eval_bind = TOPLEVEL_BINDING) @access.eval(path, eval_bind) end |
#read(path) ⇒ Object
20 21 22 |
# File 'lib/ruar/entrypoint.rb', line 20 def read(path) @access.read(path) end |