Class: Proc::Signature
- Inherits:
-
Object
- Object
- Proc::Signature
- Defined in:
- lib/decompiler/proc/signature.rb
Instance Attribute Summary collapse
-
#arg_info ⇒ Object
readonly
Returns the value of attribute arg_info.
-
#args ⇒ Object
readonly
Returns the value of attribute args.
Instance Method Summary collapse
-
#initialize(args, arg_info) ⇒ Signature
constructor
A new instance of Signature.
- #to_s ⇒ Object
Constructor Details
#initialize(args, arg_info) ⇒ Signature
Returns a new instance of Signature.
155 156 157 158 |
# File 'lib/decompiler/proc/signature.rb', line 155 def initialize(args, arg_info) @args = args @arg_info = arg_info end |
Instance Attribute Details
#arg_info ⇒ Object (readonly)
Returns the value of attribute arg_info.
153 154 155 |
# File 'lib/decompiler/proc/signature.rb', line 153 def arg_info @arg_info end |
#args ⇒ Object (readonly)
Returns the value of attribute args.
153 154 155 |
# File 'lib/decompiler/proc/signature.rb', line 153 def args @args end |
Instance Method Details
#to_s ⇒ Object
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
# File 'lib/decompiler/proc/signature.rb', line 160 def to_s if @args.unspecified then return "" elsif @args.multiple_assignment then if @args.empty_last_arg then params = @args.map{ |n| arg_info[n] } return "|#{@arg_info[@args[0]]},|" else params = @args.map{ |n| arg_info[n] } return "|#{params.join(', ')}|" end else return "|#{@arg_info[@args[0]]}|" end end |