Class: Pfm::Settings::Setting
- Inherits:
-
Object
- Object
- Pfm::Settings::Setting
- Defined in:
- lib/iapi-idlc-sdk-pfm/settings.rb
Overview
Defines an individual setting
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #defined? ⇒ Boolean
-
#initialize(value, required = false) ⇒ Setting
constructor
A new instance of Setting.
- #required? ⇒ Boolean
- #to_s ⇒ Object
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
#value ⇒ Object (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
81 82 83 |
# File 'lib/iapi-idlc-sdk-pfm/settings.rb', line 81 def defined? !@value.nil? end |
#required? ⇒ Boolean
77 78 79 |
# File 'lib/iapi-idlc-sdk-pfm/settings.rb', line 77 def required? @required end |
#to_s ⇒ Object
85 86 87 |
# File 'lib/iapi-idlc-sdk-pfm/settings.rb', line 85 def to_s @value.to_s end |