Class: Blur::Script

Inherits:
Object
  • Object
show all
Includes:
Callbacks, DSL
Defined in:
library/blur/script.rb,
library/blur/script/dsl.rb,
library/blur/script/cache.rb

Overview

The Script class is used for encapsulating dynamically loaded ruby scripts.

Defined Under Namespace

Modules: DSL Classes: Cache

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Callbacks

#callbacks, #emit, #on

Methods included from DSL

#Author, #Description, #Version, #author, #description, included, #name, #version

Class Method Details

.inspectObject

Inspect the script class.



24
25
26
# File 'library/blur/script.rb', line 24

def self.inspect
  %%#<Blur::Script @@name=#{name.inspect}>%
end

.nameSymbol

Get the script name.

Returns:

  • (Symbol)

    the script name.



12
13
14
# File 'library/blur/script.rb', line 12

def self.name
  class_variable_get :@@name
end

.script_init(*args) ⇒ Object

Called when a new script block is called.

Parameters:

  • args

    the extra arguments to the Script block.



19
20
21
# File 'library/blur/script.rb', line 19

def self.script_init *args
  options = args.pop if args.last.is_a? Hash
end

Instance Method Details

#inspectObject

Inspect the script instance.



29
30
31
# File 'library/blur/script.rb', line 29

def inspect
  %%#<Blur::Script::0x#{object_id.to_s 16}(#{@@name})>%
end

#to_sObject

Inspect the script instance.



34
35
36
# File 'library/blur/script.rb', line 34

def to_s
  inspect
end