Class: RTM::Axes::Characteristic

Inherits:
ItemProxy show all
Defined in:
lib/rtm/axes.rb,
lib/rtm/axes/characteristic.rb

Overview

—- RTM::Axes::Characteristic ——————————-#

Direct Known Subclasses

Name, Occurrence

Instance Attribute Summary

Attributes inherited from Proxy

#construct, #tm

Instance Method Summary collapse

Methods inherited from Proxy

#initialize

Constructor Details

This class inherits a constructor from RTM::Axes::Proxy

Instance Method Details

#atomifyObject

Returns the atomic value of the Characteristic.

:call-seq:

atomify -> String


15
16
17
18
# File 'lib/rtm/axes/characteristic.rb', line 15

def atomify
  _res = @construct.atomify #String
  RTM::Axes::String.new(_res,@tm)
end

#reverse_characteristics(type = :any) ⇒ Object

Returns the Topic this Characteristic belongs to. The optional argument identifier filters the Characteristic for its type. If the type does not match, nil is returned.

The identifier may be a topic reference.

:call-seq:

reverse_characteristics -> Topic
reverse_characteristics(identifier) -> Topic or nil


33
34
35
36
# File 'lib/rtm/axes/characteristic.rb', line 33

def reverse_characteristics(type=:any)
  _res = @construct.reverse_characteristics(type) #Topic or nil
  RTM::Axes::Topic.new(_res,@tm) if _res
end

#reverse_reifierObject

Returns the reifing Topic of this Characteristic or nil, if no such Topic exists.

:call-seq:

reverse_reified -> Topic or nil


47
48
49
50
# File 'lib/rtm/axes/characteristic.rb', line 47

def reverse_reifier
  _res = @construct.reifier #Topic or nil
  RTM::Axes::Topic.new(_res,@tm) if _res
end

#scopeObject

Returns the scope of this Characteristic.

The result may be empty.

:call-seq:

scope -> Array of Topics


61
62
63
64
# File 'lib/rtm/axes/characteristic.rb', line 61

def scope
  _res = @construct.scope.map{|r| r.axes}
  _res.extend(Topics)
end