Class: Smplkit::FlagDeclaration
- Inherits:
-
Object
- Object
- Smplkit::FlagDeclaration
- Defined in:
- lib/smplkit/flags/types.rb
Overview
Describes a flag declaration for buffered registration.
Used by Smplkit::ManagementClient#flags#register to queue declarations for bulk registration. service and environment default to nil; the runtime client fills them from the active Smplkit::Client when it forwards declarations.
Instance Attribute Summary collapse
-
#default ⇒ Object
readonly
Returns the value of attribute default.
-
#environment ⇒ Object
readonly
Returns the value of attribute environment.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#service ⇒ Object
readonly
Returns the value of attribute service.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(id:, type:, default:, service: nil, environment: nil) ⇒ FlagDeclaration
constructor
A new instance of FlagDeclaration.
Constructor Details
#initialize(id:, type:, default:, service: nil, environment: nil) ⇒ FlagDeclaration
Returns a new instance of FlagDeclaration.
151 152 153 154 155 156 157 158 |
# File 'lib/smplkit/flags/types.rb', line 151 def initialize(id:, type:, default:, service: nil, environment: nil) @id = id @type = type @default = default @service = service @environment = environment freeze end |
Instance Attribute Details
#default ⇒ Object (readonly)
Returns the value of attribute default.
149 150 151 |
# File 'lib/smplkit/flags/types.rb', line 149 def default @default end |
#environment ⇒ Object (readonly)
Returns the value of attribute environment.
149 150 151 |
# File 'lib/smplkit/flags/types.rb', line 149 def environment @environment end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
149 150 151 |
# File 'lib/smplkit/flags/types.rb', line 149 def id @id end |
#service ⇒ Object (readonly)
Returns the value of attribute service.
149 150 151 |
# File 'lib/smplkit/flags/types.rb', line 149 def service @service end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
149 150 151 |
# File 'lib/smplkit/flags/types.rb', line 149 def type @type end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
160 161 162 163 |
# File 'lib/smplkit/flags/types.rb', line 160 def ==(other) other.is_a?(FlagDeclaration) && id == other.id && type == other.type && default == other.default && service == other.service && environment == other.environment end |
#hash ⇒ Object
166 |
# File 'lib/smplkit/flags/types.rb', line 166 def hash = [id, type, default, service, environment].hash |