Class: Dialekt::Util::CallSignature::Parameter
- Inherits:
-
Object
- Object
- Dialekt::Util::CallSignature::Parameter
- Defined in:
- lib/dialekt/util/call_signature.rb
Overview
Parameter information
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(name:, optional:) ⇒ Parameter
constructor
A new instance of Parameter.
- #optional? ⇒ Boolean
Constructor Details
#initialize(name:, optional:) ⇒ Parameter
Returns a new instance of Parameter.
11 12 13 14 |
# File 'lib/dialekt/util/call_signature.rb', line 11 def initialize(name:, optional:) @name = name.to_sym @optional = optional end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/dialekt/util/call_signature.rb', line 9 def name @name end |
Instance Method Details
#==(other) ⇒ Object
20 21 22 |
# File 'lib/dialekt/util/call_signature.rb', line 20 def ==(other) @name == other.name && @optional == other.optional? end |
#optional? ⇒ Boolean
16 17 18 |
# File 'lib/dialekt/util/call_signature.rb', line 16 def optional? @optional end |