Class: EightBall::Conditions::Opaque

Inherits:
Base
  • Object
show all
Defined in:
lib/eight_ball/conditions/opaque.rb

Overview

Wraps a condition entry that could not be built (unknown type, invalid params, or a non-object entry). It is never satisfiable and re-serializes to its original raw input, so a Feature holding one is failed closed yet round-trips verbatim. Not registered in by_name; produced only as a parse fallback.

Instance Attribute Summary collapse

Attributes inherited from Base

#parameter

Instance Method Summary collapse

Methods inherited from Base

#==, #hash, #wire_fields

Constructor Details

#initialize(raw) ⇒ Opaque

Returns a new instance of Opaque.



11
12
13
# File 'lib/eight_ball/conditions/opaque.rb', line 11

def initialize(raw)
  @raw = raw
end

Instance Attribute Details

#rawObject (readonly)

Returns the value of attribute raw.



9
10
11
# File 'lib/eight_ball/conditions/opaque.rb', line 9

def raw
  @raw
end

Instance Method Details

#satisfied?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/eight_ball/conditions/opaque.rb', line 15

def satisfied?(*)
  false
end

#to_wireObject

Re-emit the original entry unchanged.



20
21
22
# File 'lib/eight_ball/conditions/opaque.rb', line 20

def to_wire
  @raw
end