Class: Sass::Repl
- Inherits:
-
Object
- Object
- Sass::Repl
- Defined in:
- .ruby-sass/lib/sass/repl.rb
Overview
Runs a SassScript read-eval-print loop. It presents a prompt on the terminal, reads in SassScript expressions, evaluates them, and prints the result.
Instance Method Summary (collapse)
-
#initialize(options = {}) ⇒ Repl
constructor
A new instance of Repl.
-
#run ⇒ Object
Starts the read-eval-print loop.
Constructor Details
#initialize(options = {}) ⇒ Repl
Returns a new instance of Repl
11 12 13 |
# File '.ruby-sass/lib/sass/repl.rb', line 11 def initialize( = {}) @options = end |
Constructor Details
#initialize(options = {}) ⇒ Repl
Returns a new instance of Repl
11 12 13 |
# File '.ruby-sass/lib/sass/repl.rb', line 11 def initialize( = {}) @options = end |
Instance Method Details
#run ⇒ Object
Starts the read-eval-print loop.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File '.ruby-sass/lib/sass/repl.rb', line 16 def run environment = Environment.new @line = 0 loop do @line += 1 unless (text = Readline.readline('>> ')) puts return end Readline::HISTORY << text parse_input(environment, text) end end |