In Files

Parent

Methods

Class/Module Index [+]

Quicksearch

Sass::Repl

Runs a SassScript read-eval-print loop. It presents a prompt on the terminal, reads in SassScript expressions, evaluates them, and prints the result.

Public Class Methods

new(options = {}) click to toggle source

@param options [{Symbol => Object}] An options hash.

# File lib/sass/repl.rb, line 11
def initialize(options = {})
  @options = options
end

Public Instance Methods

run() click to toggle source

Starts the read-eval-print loop.

# File 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

[Validate]

Generated with the Darkfish Rdoc Generator 2.