Class: Foobara::Callback::Registry::JoinedConditioned

Inherits:
Conditioned show all
Defined in:
foobara-0.1.7/projects/callback/src/registry/joined_conditioned.rb

Instance Attribute Summary collapse

Attributes inherited from Conditioned

#callback_sets

Attributes inherited from Base

#allowed_types

Instance Method Summary collapse

Methods inherited from Conditioned

#specific_callback_set_for

Methods inherited from Base

#after, #around, #before, #error, #has_after_callbacks?, #has_around_callbacks?, #has_before_callbacks?, #has_callbacks?, #has_error_callbacks?, #register_callback, #runner, #specific_callback_set_for

Constructor Details

#initialize(first, second) ⇒ JoinedConditioned

Returns a new instance of JoinedConditioned.



17
18
19
20
21
22
# File 'foobara-0.1.7/projects/callback/src/registry/joined_conditioned.rb', line 17

def initialize(first, second)
  self.first = first
  self.second = second

  super(possible_conditions)
end

Instance Attribute Details

#firstObject

Returns the value of attribute first.



7
8
9
# File 'foobara-0.1.7/projects/callback/src/registry/joined_conditioned.rb', line 7

def first
  @first
end

#secondObject

Returns the value of attribute second.



7
8
9
# File 'foobara-0.1.7/projects/callback/src/registry/joined_conditioned.rb', line 7

def second
  @second
end

Instance Method Details

#possible_condition_keysObject



13
14
15
# File 'foobara-0.1.7/projects/callback/src/registry/joined_conditioned.rb', line 13

def possible_condition_keys
  first.possible_condition_keys
end

#possible_conditionsObject



9
10
11
# File 'foobara-0.1.7/projects/callback/src/registry/joined_conditioned.rb', line 9

def possible_conditions
  first.possible_conditions
end

#unioned_callback_set_forObject



24
25
26
27
28
29
30
# File 'foobara-0.1.7/projects/callback/src/registry/joined_conditioned.rb', line 24

def unioned_callback_set_for(...)
  super.union(
    first.unioned_callback_set_for(...).union(
      second.unioned_callback_set_for(...)
    )
  )
end