Class: Roger::Rogerfile::Context

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

Overview

This is the context for the rogerfile evaluation. It should be empty except for the #roger method (and deprecated #mockup method).

Instance Method Summary collapse

Constructor Details

#initialize(rogerfile) ⇒ Context

Returns a new instance of Context.



7
8
9
# File 'lib/roger/rogerfile.rb', line 7

def initialize(rogerfile)
  @_rogerfile = rogerfile
end

Instance Method Details

#bindingObject



22
23
24
# File 'lib/roger/rogerfile.rb', line 22

def binding
  ::Kernel.binding
end

#mockupObject

Deprecated.

Please use roger method instead.



16
17
18
19
20
# File 'lib/roger/rogerfile.rb', line 16

def mockup
  warn("The use of mockup has been deprecated; please use roger instead")
  warn("  on #{caller.first}")
  roger
end

#rogerObject



11
12
13
# File 'lib/roger/rogerfile.rb', line 11

def roger
  @_rogerfile
end