wrapture 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0a808f785d4a2a78afea58ed889d1b177f73dbd820206bd1d0ff55f0a9de1d16
4
- data.tar.gz: 91197fff6cf5343c365b8f4ad3a2efdc913576355bc90a82c5040fa28442058b
3
+ metadata.gz: 6a5516a3af955bee34acada560a1c0f67e4a7f6b07772e0fc27accf82103377e
4
+ data.tar.gz: ddba6f0862fcde505a9f7501b95ddf22acdffc6f9b4fed15a8fc5b0d3afdcf42
5
5
  SHA512:
6
- metadata.gz: 561bdb4547a1e4617bba11c99921b2b475e4e6178e58202b066f51e2e6fee89ce11b64408d33e73952869dcef1ac1e2c793295f1bb79ac9bdcbee0e6b9e4eb49
7
- data.tar.gz: ed3a3e6b8a2062bc0938cd18253f9f90f64893a2cfc26b9b4fe0f043ca66e2806f75cc9acfc0054cf18e2a99f93cd1b6fd089561a91363f76bd4accc7cae22b5
6
+ metadata.gz: c770a67468d131f448a1640a9f2f76ce7e089bbf42980443cd70ce9388d581d1066e6c4435419bda81c442f4e09a838a52986f6661cf52791ca57cda88ddbb66
7
+ data.tar.gz: 27fc54ad64f8375c6815fb9b3263050f551d5a180089c1aa733833ef8a1d80bc3a9e625be74e990645dbd3db9fe78fac466bf90599a80c140e9d88bf05a1e2da
@@ -185,12 +185,17 @@ module Wrapture
185
185
  # Calls return_expression on the return type of this function. +func_name+
186
186
  # is passed to return_expression if provided.
187
187
  def return_expression(func_name: name)
188
- resolved_return.return_expression(self, func_name: func_name)
188
+ if @constructor || @destructor
189
+ signature(func_name: func_name)
190
+ else
191
+ resolved_return.return_expression(self, func_name: func_name)
192
+ end
189
193
  end
190
194
 
191
- # The signature of the function.
192
- def signature
193
- "#{name}( #{param_list} )"
195
+ # The signature of the function. +func_name+ can be used to override the
196
+ # function name if needed, for example if a class name qualifier is needed.
197
+ def signature(func_name: name)
198
+ "#{func_name}( #{param_list} )"
194
199
  end
195
200
 
196
201
  # Yields each line of the declaration of the function, including any
@@ -198,11 +203,6 @@ module Wrapture
198
203
  def declaration
199
204
  doc.format_as_doxygen(max_line_length: 76) { |line| yield line }
200
205
 
201
- if @constructor || @destructor
202
- yield "#{signature};"
203
- return
204
- end
205
-
206
206
  modifier_prefix = if @spec['static']
207
207
  'static '
208
208
  elsif virtual?
@@ -20,7 +20,7 @@
20
20
 
21
21
  module Wrapture
22
22
  # the current version of Wrapture
23
- VERSION = '0.4.0'
23
+ VERSION = '0.4.1'
24
24
 
25
25
  # Returns true if the version of the spec is supported by this version of
26
26
  # Wrapture. Otherwise returns false.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wrapture
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Anderson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-23 00:00:00.000000000 Z
11
+ date: 2020-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler