Exception: Lucid::InterfaceRb::MultipleDomain

Inherits:
StandardError
  • Object
show all
Defined in:
lib/lucid/interface_rb/rb_language.rb

Overview

Raised if there are 2 or more Domain blocks.

Instance Method Summary collapse

Constructor Details

#initialize(first_proc, second_proc) ⇒ MultipleDomain

Returns a new instance of MultipleDomain.



31
32
33
34
35
36
37
38
# File 'lib/lucid/interface_rb/rb_language.rb', line 31

def initialize(first_proc, second_proc)
  message = "You can only pass a proc to #Domain once, but it's happening\n"
  message << "in two places:\n\n"
  message << first_proc.backtrace_line('Domain') << "\n"
  message << second_proc.backtrace_line('Domain') << "\n\n"
  message << "Use Ruby modules instead to extend your worlds. See the Lucid::InterfaceRb::RbLucid#Domain RDoc\n"
  super(message)
end