Class: VORuby::VOTables::VOTable::Type::Actuate
- 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
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(txt = nil) ⇒ Actuate
constructor
- txt:
-
The event.
- #to_s ⇒ Object
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
#value ⇒ Object (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_s ⇒ Object
281 282 283 |
# File 'lib/voruby/votables/types.rb', line 281 def to_s "{#{@value}}" end |