Class: Riddl::Wrapper::Description::RequestTransformation
- Inherits:
-
AccessBase
- Object
- AccessBase
- Riddl::Wrapper::Description::RequestTransformation
- Defined in:
- lib/ruby/riddl/wrapper/description/access.rb
Overview
}}}
Instance Attribute Summary collapse
-
#out ⇒ Object
Returns the value of attribute out.
-
#trans ⇒ Object
readonly
Returns the value of attribute trans.
Attributes inherited from AccessBase
Class Method Summary collapse
Instance Method Summary collapse
- #hash ⇒ Object
-
#initialize(des, mtrans, interface, custom = []) ⇒ RequestTransformation
constructor
{{{.
- #transform(min) ⇒ Object
- #visualize ⇒ Object
Methods inherited from AccessBase
Constructor Details
#initialize(des, mtrans, interface, custom = []) ⇒ RequestTransformation
{{{
40 41 42 43 44 45 46 47 48 49 |
# 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 |
Instance Attribute Details
#out ⇒ Object
Returns the value of attribute out.
64 65 66 |
# File 'lib/ruby/riddl/wrapper/description/access.rb', line 64 def out @out end |
#trans ⇒ Object (readonly)
Returns the value of attribute trans.
63 64 65 |
# File 'lib/ruby/riddl/wrapper/description/access.rb', line 63 def trans @trans end |
Class Method Details
.new_from_transformation(mtrans1, mtrans2, custom) ⇒ Object
50 51 52 53 54 55 |
# 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 |
Instance Method Details
#hash ⇒ Object
65 66 67 |
# File 'lib/ruby/riddl/wrapper/description/access.rb', line 65 def hash @trans.hash + (@out.nil? ? 0 : @out.hash) end |
#transform(min) ⇒ Object
56 57 58 59 60 61 62 |
# 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 ⇒ Object
68 |
# File 'lib/ruby/riddl/wrapper/description/access.rb', line 68 def visualize; "transformation #{@trans.name.inspect}"; end |