Class: Togul::EvaluateResult

Inherits:
Object
  • Object
show all
Defined in:
lib/togul/evaluate_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(flag_key:, enabled:, value_type:, value:, reason:) ⇒ EvaluateResult

Returns a new instance of EvaluateResult.



7
8
9
10
11
12
13
# File 'lib/togul/evaluate_result.rb', line 7

def initialize(flag_key:, enabled:, value_type:, value:, reason:)
  @flag_key   = flag_key
  @enabled    = enabled
  @value_type = value_type
  @value      = value
  @reason     = reason
end

Instance Attribute Details

#enabledObject (readonly)

Returns the value of attribute enabled.



5
6
7
# File 'lib/togul/evaluate_result.rb', line 5

def enabled
  @enabled
end

#flag_keyObject (readonly)

Returns the value of attribute flag_key.



5
6
7
# File 'lib/togul/evaluate_result.rb', line 5

def flag_key
  @flag_key
end

#reasonObject (readonly)

Returns the value of attribute reason.



5
6
7
# File 'lib/togul/evaluate_result.rb', line 5

def reason
  @reason
end

#valueObject (readonly)

Returns the value of attribute value.



5
6
7
# File 'lib/togul/evaluate_result.rb', line 5

def value
  @value
end

#value_typeObject (readonly)

Returns the value of attribute value_type.



5
6
7
# File 'lib/togul/evaluate_result.rb', line 5

def value_type
  @value_type
end

Instance Method Details

#enabled?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/togul/evaluate_result.rb', line 15

def enabled?
  @enabled == true
end