Class: VORuby::VOTables::VOTable::Type::Actuate

Inherits:
Object
  • Object
show all
Defined in:
lib/voruby/votables/types.rb

Overview

A class representing an actuator event.

Constant Summary collapse

@@events =
['onLoad', 'onRequest', 'other', 'none']

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(txt = nil) ⇒ Actuate

txt:

The event. Choices: onLoad, onRequest, other, none.



272
273
274
275
276
277
278
279
# File 'lib/voruby/votables/types.rb', line 272

def initialize(txt=nil)
if txt and @@events.include?(txt)
 @value = txt
else
 raise "Actuate event '#{txt}' is not valid:  " +
	  @@events.join(', ')
end
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



267
268
269
# File 'lib/voruby/votables/types.rb', line 267

def value
  @value
end

Instance Method Details

#to_sObject



281
282
283
# File 'lib/voruby/votables/types.rb', line 281

def to_s
 "{#{@value}}"
end