Class: Riddl::Wrapper::Description::RequestInOut

Inherits:
AccessBase
  • Object
show all
Defined in:
lib/ruby/riddl/wrapper/description/access.rb

Overview

}}}

Instance Attribute Summary collapse

Attributes inherited from AccessBase

#custom, #interface

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AccessBase

#used=, #used?

Constructor Details

#initialize(des, min, mout, interface, custom = []) ⇒ RequestInOut

{{{



18
19
20
21
22
23
24
25
26
27
28
# File 'lib/ruby/riddl/wrapper/description/access.rb', line 18

def initialize(des,min,mout,interface,custom=[])
  @custom = custom
  @interface = interface
  if des.nil?
    @in = min
    @out = mout
  else
    @in = Riddl::Wrapper::Description::Message.new(des,min)
    @out = mout.nil? ? nil : Riddl::Wrapper::Description::Message.new(des,mout)
  end
end

Instance Attribute Details

#inObject (readonly)

Returns the value of attribute in.



35
36
37
# File 'lib/ruby/riddl/wrapper/description/access.rb', line 35

def in
  @in
end

#outObject (readonly)

Returns the value of attribute out.



35
36
37
# File 'lib/ruby/riddl/wrapper/description/access.rb', line 35

def out
  @out
end

Class Method Details

.new_from_message(min, mout, custom) ⇒ Object



29
30
31
# File 'lib/ruby/riddl/wrapper/description/access.rb', line 29

def self.new_from_message(min,mout,custom)
  RequestInOut.new(nil,min,mout,nil,custom)
end

Instance Method Details

#hashObject



32
33
34
# File 'lib/ruby/riddl/wrapper/description/access.rb', line 32

def hash
  @in.hash + (@out.nil? ? 0 : @out.hash)
end

#visualizeObject



36
# File 'lib/ruby/riddl/wrapper/description/access.rb', line 36

def visualize; "in #{@in.name.inspect} out #{@out.nil? ? "NIL" : @out.name.inspect}"; end