Class: ViewSpec::ExecutableProc
- Inherits:
-
Object
- Object
- ViewSpec::ExecutableProc
- Defined in:
- lib/view_spec/executable_proc.rb
Instance Method Summary collapse
-
#initialize(proc) ⇒ ExecutableProc
constructor
A new instance of ExecutableProc.
- #lang ⇒ Object
- #source ⇒ Object
- #to_proc ⇒ Object (also: #raw)
Constructor Details
#initialize(proc) ⇒ ExecutableProc
Returns a new instance of ExecutableProc.
3 4 5 |
# File 'lib/view_spec/executable_proc.rb', line 3 def initialize(proc) @executable = proc end |
Instance Method Details
#lang ⇒ Object
11 12 13 |
# File 'lib/view_spec/executable_proc.rb', line 11 def lang :ruby end |
#source ⇒ Object
7 8 9 |
# File 'lib/view_spec/executable_proc.rb', line 7 def source CGI.unescapeHTML inner_source.strip_heredoc.strip end |
#to_proc ⇒ Object Also known as: raw
15 16 17 |
# File 'lib/view_spec/executable_proc.rb', line 15 def to_proc @executable end |