class T2Server::Administrator::AdminResource

This class represents a resource in the Taverna Server administrative interface. A resource can be read only or read/write.

Resources are created when the parent Administrator class is created and are accessed via the [] method within that class.

Attributes

name[R]

The name of this resource.

uri[R]

The URI of this resource on the server.

Public Instance Methods

value → string click to toggle source
value=

Get or set the value held by this resource. This call always queries the server as values can change without user intervention.

The resource can only be set if it is writable.

    # File lib/t2-server/admin.rb
130 def value
131   @admin.get_resource_value(@uri)
132 end
writable? → true or false click to toggle source

Is this resource writable?

    # File lib/t2-server/admin.rb
138 def writable?
139   @writeable
140 end

Private Instance Methods

make_writable() click to toggle source
    # File lib/t2-server/admin.rb
143 def make_writable
144   (class << self; self; end).instance_eval do
145     define_method "value=" do |value|
146       @admin.set_resource_value(@uri, value)
147     end
148   end
149 end