Module: Rulp::Initializers

Included in:
LV
Defined in:
lib/rulp/rulp_initializers.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



12
13
14
# File 'lib/rulp/rulp_initializers.rb', line 12

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

#initialize(name, args) ⇒ Object

Raises:

  • (StandardError)


3
4
5
6
7
8
9
10
# File 'lib/rulp/rulp_initializers.rb', line 3

def initialize(name, args)
  @name = name
  @args = args
  @value = nil
  @identifier = "#{self.name}#{self.args.join("_")}"
  raise StandardError.new("Variable with the name #{self} of a different type (#{LV::names_table[self.to_s].class}) already exists") if LV::names_table[self.to_s]
  LV::names_table[self.to_s] = self
end

#to_sObject



26
27
28
# File 'lib/rulp/rulp_initializers.rb', line 26

def to_s
  @identifier
end