Class: Pfm::Settings::Setting

Inherits:
Object
  • Object
show all
Defined in:
lib/iapi-idlc-sdk-pfm/settings.rb

Overview

Defines an individual setting

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value, required = false) ⇒ Setting

Returns a new instance of Setting.



72
73
74
75
# File 'lib/iapi-idlc-sdk-pfm/settings.rb', line 72

def initialize(value, required = false)
  @value = value
  @required = required
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



70
71
72
# File 'lib/iapi-idlc-sdk-pfm/settings.rb', line 70

def value
  @value
end

Instance Method Details

#defined?Boolean

Returns:

  • (Boolean)


81
82
83
# File 'lib/iapi-idlc-sdk-pfm/settings.rb', line 81

def defined?
  !@value.nil?
end

#required?Boolean

Returns:

  • (Boolean)


77
78
79
# File 'lib/iapi-idlc-sdk-pfm/settings.rb', line 77

def required?
  @required
end

#to_sObject



85
86
87
# File 'lib/iapi-idlc-sdk-pfm/settings.rb', line 85

def to_s
  @value.to_s
end