class Riddl::Wrapper::Description::RequestTransformation

Attributes

out[RW]
trans[R]

Public Class Methods

new(des,mtrans,interface,custom=[]) click to toggle source
# File lib/ruby/riddl/wrapper/description/access.rb, line 40
def initialize(des,mtrans,interface,custom=[])
  @custom = custom
  @interface = interface
  if des.nil?
    @trans = mtrans
  else
    @trans = Riddl::Wrapper::Description::Transformation.new(des,mtrans)
  end
  @out = nil
end
new_from_transformation(mtrans1,mtrans2,custom) click to toggle source
# File lib/ruby/riddl/wrapper/description/access.rb, line 50
def self.new_from_transformation(mtrans1,mtrans2,custom)
  tmp = XML::Smart::string("<transformation/>")
  tmp.root.add mtrans1.content.root.children
  tmp.root.add mtrans2.content.root.children
  RequestTransformation.new(nil,Riddl::Wrapper::Description::Transformation.new_from_xml("#{mtrans2.name}_#{mtrans2.name}_merged",tmp),nil,custom)
end

Public Instance Methods

hash() click to toggle source
# File lib/ruby/riddl/wrapper/description/access.rb, line 65
def hash
  @trans.hash + (@out.nil? ? 0 : @out.hash)
end
transform(min) click to toggle source
# File lib/ruby/riddl/wrapper/description/access.rb, line 56
def transform(min)
  tmp = self.dup
  if min.class == RequestInOut && !min.out.nil?
    tmp.out = min.out.transform(@trans)
  end
  tmp
end
visualize() click to toggle source
# File lib/ruby/riddl/wrapper/description/access.rb, line 68
def visualize; "transformation #{@trans.name.inspect}"; end