Class: Atacama::Parameter
- Inherits:
-
Object
- Object
- Atacama::Parameter
- Defined in:
- lib/atacama/contract/parameter.rb
Overview
A description of the signature of the parameter being validated
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name:, type: nil) ⇒ Parameter
constructor
A new instance of Parameter.
Constructor Details
#initialize(name:, type: nil) ⇒ Parameter
Returns a new instance of Parameter.
8 9 10 11 |
# File 'lib/atacama/contract/parameter.rb', line 8 def initialize(name:, type: nil) @name = name @type = type end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/atacama/contract/parameter.rb', line 6 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/atacama/contract/parameter.rb', line 6 def type @type end |