Class: Pinspec::InputCase
- Inherits:
-
Data
- Object
- Data
- Pinspec::InputCase
- Defined in:
- lib/pinspec/types.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#ctor_args ⇒ Object
readonly
Returns the value of attribute ctor_args.
-
#ctor_kwargs ⇒ Object
readonly
Returns the value of attribute ctor_kwargs.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#kwargs ⇒ Object
readonly
Returns the value of attribute kwargs.
-
#origin ⇒ Object
readonly
Returns the value of attribute origin.
Instance Method Summary collapse
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args
75 76 77 |
# File 'lib/pinspec/types.rb', line 75 def args @args end |
#ctor_args ⇒ Object (readonly)
Returns the value of attribute ctor_args
75 76 77 |
# File 'lib/pinspec/types.rb', line 75 def ctor_args @ctor_args end |
#ctor_kwargs ⇒ Object (readonly)
Returns the value of attribute ctor_kwargs
75 76 77 |
# File 'lib/pinspec/types.rb', line 75 def ctor_kwargs @ctor_kwargs end |
#id ⇒ Object (readonly)
Returns the value of attribute id
75 76 77 |
# File 'lib/pinspec/types.rb', line 75 def id @id end |
#kwargs ⇒ Object (readonly)
Returns the value of attribute kwargs
75 76 77 |
# File 'lib/pinspec/types.rb', line 75 def kwargs @kwargs end |
#origin ⇒ Object (readonly)
Returns the value of attribute origin
75 76 77 |
# File 'lib/pinspec/types.rb', line 75 def origin @origin end |
Instance Method Details
#signature ⇒ Object
76 77 78 |
# File 'lib/pinspec/types.rb', line 76 def signature [ctor_args, ctor_kwargs, args, kwargs] end |
#to_s ⇒ Object
80 81 82 83 84 85 86 87 88 |
# File 'lib/pinspec/types.rb', line 80 def to_s ctor = render(ctor_args, ctor_kwargs) meth = render(args, kwargs) receiver = ctor_args.empty? && ctor_kwargs.empty? ? "" : "new(#{ctor})." invocation = meth.empty? ? "call" : "call(#{meth})" "#{id} (#{origin}) #{receiver}#{invocation}" end |