Class: Atacama::Parameter

Inherits:
Object
  • Object
show all
Defined in:
lib/atacama/contract/parameter.rb

Overview

A description of the signature of the parameter being validated

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/atacama/contract/parameter.rb', line 6

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



6
7
8
# File 'lib/atacama/contract/parameter.rb', line 6

def type
  @type
end