Class: RSMP::SXL::Interface
- Inherits:
-
Object
- Object
- RSMP::SXL::Interface
show all
- Extended by:
- Forwardable
- Defined in:
- lib/rsmp/sxl/interface.rb
Overview
Base interface for SXL-specific behavior on a proxy connection.
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(proxy:, name:, version:) ⇒ Interface
20
21
22
23
24
|
# File 'lib/rsmp/sxl/interface.rb', line 20
def initialize(proxy:, name:, version:)
@proxy = proxy
@name = name
@version = version
end
|
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
18
19
20
|
# File 'lib/rsmp/sxl/interface.rb', line 18
def name
@name
end
|
#proxy ⇒ Object
Returns the value of attribute proxy.
18
19
20
|
# File 'lib/rsmp/sxl/interface.rb', line 18
def proxy
@proxy
end
|
#version ⇒ Object
Returns the value of attribute version.
18
19
20
|
# File 'lib/rsmp/sxl/interface.rb', line 18
def version
@version
end
|
Instance Method Details
#components ⇒ Object
30
31
32
|
# File 'lib/rsmp/sxl/interface.rb', line 30
def components
proxy.respond_to?(:components) ? proxy.components : proxy.site.components
end
|
#core_version ⇒ Object
42
43
44
|
# File 'lib/rsmp/sxl/interface.rb', line 42
def core_version
proxy.core_version
end
|
#main ⇒ Object
34
35
36
|
# File 'lib/rsmp/sxl/interface.rb', line 34
def main
proxy.respond_to?(:main) ? proxy.main : proxy.site.main
end
|
#node ⇒ Object
26
27
28
|
# File 'lib/rsmp/sxl/interface.rb', line 26
def node
proxy.node
end
|
#sxl_version ⇒ Object
38
39
40
|
# File 'lib/rsmp/sxl/interface.rb', line 38
def sxl_version
version
end
|
#use_soc? ⇒ Boolean
46
47
48
49
50
|
# File 'lib/rsmp/sxl/interface.rb', line 46
def use_soc?
return false unless core_version
RSMP::Proxy.version_meets_requirement?(core_version, '>=3.1.5')
end
|
#validate_message!(_message) ⇒ Object
52
|
# File 'lib/rsmp/sxl/interface.rb', line 52
def validate_message!(_message); end
|