Class: DebugBundle::RemoteConfig::Directive
- Inherits:
-
Struct
- Object
- Struct
- DebugBundle::RemoteConfig::Directive
- Defined in:
- lib/debugbundle/remote_config.rb
Instance Attribute Summary collapse
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#expires_at ⇒ Object
Returns the value of attribute expires_at.
-
#id ⇒ Object
Returns the value of attribute id.
-
#label_pattern ⇒ Object
Returns the value of attribute label_pattern.
-
#service ⇒ Object
Returns the value of attribute service.
Instance Method Summary collapse
Instance Attribute Details
#environment ⇒ Object
Returns the value of attribute environment
17 18 19 |
# File 'lib/debugbundle/remote_config.rb', line 17 def environment @environment end |
#expires_at ⇒ Object
Returns the value of attribute expires_at
17 18 19 |
# File 'lib/debugbundle/remote_config.rb', line 17 def expires_at @expires_at end |
#id ⇒ Object
Returns the value of attribute id
17 18 19 |
# File 'lib/debugbundle/remote_config.rb', line 17 def id @id end |
#label_pattern ⇒ Object
Returns the value of attribute label_pattern
17 18 19 |
# File 'lib/debugbundle/remote_config.rb', line 17 def label_pattern @label_pattern end |
#service ⇒ Object
Returns the value of attribute service
17 18 19 |
# File 'lib/debugbundle/remote_config.rb', line 17 def service @service end |
Instance Method Details
#active?(label:, service:, environment:, now:) ⇒ Boolean
18 19 20 21 22 23 24 |
# File 'lib/debugbundle/remote_config.rb', line 18 def active?(label:, service:, environment:, now:) return false if expires_at <= now return false unless match_scope?(self.service, service) return false unless match_scope?(self.environment, environment) match_label?(label_pattern, label) end |