Class: LightService::ValidatedContext::ValidatedKey

Inherits:
Object
  • Object
show all
Defined in:
lib/light_service/validated_context/validated_key.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(label, type, message: nil) ⇒ ValidatedKey

Returns a new instance of ValidatedKey.



8
9
10
11
12
# File 'lib/light_service/validated_context/validated_key.rb', line 8

def initialize(label, type, message: nil)
  @label = label
  @type = type
  @message = message
end

Instance Attribute Details

#labelObject (readonly)

Returns the value of attribute label.



6
7
8
# File 'lib/light_service/validated_context/validated_key.rb', line 6

def label
  @label
end

#messageObject (readonly)

Returns the value of attribute message.



6
7
8
# File 'lib/light_service/validated_context/validated_key.rb', line 6

def message
  @message
end

#typeObject (readonly)

Returns the value of attribute type.



6
7
8
# File 'lib/light_service/validated_context/validated_key.rb', line 6

def type
  @type
end

Instance Method Details

#to_sObject



18
19
20
# File 'lib/light_service/validated_context/validated_key.rb', line 18

def to_s
  label.to_s
end

#to_symObject



14
15
16
# File 'lib/light_service/validated_context/validated_key.rb', line 14

def to_sym
  label.to_sym
end