Module: Drymm::Shapes::SumEnclosure Private

Includes:
Dry::Types::Meta, Dry::Types::Type
Included in:
Fn, Logic, Types
Defined in:
lib/drymm/shapes/sum_enclosure.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#call(type: :id, id: ) ⇒ self #call(type: :callable, callable: ) ⇒ self #call(type: :method, target: , name: ) ⇒ self

Overloads:

  • #call(type: :id, id: ) ⇒ self

    Parameters:

    • id (Symbol, String) (defaults to: )
  • #call(type: :callable, callable: ) ⇒ self

    Parameters:

    • callable (#call) (defaults to: )
  • #call(type: :method, target: , name: ) ⇒ self

    Parameters:

    • target (#namee) (defaults to: )

      ] namespace

    • name (Symbol, String) (defaults to: )

Returns:

  • (self)


# File 'lib/drymm/shapes/sum_enclosure.rb', line 15

#call_safe(input, &block) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



31
32
33
# File 'lib/drymm/shapes/sum_enclosure.rb', line 31

def call_safe(input, &block)
  @sum.call(input, &block)
end

#call_unsafe(input) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



26
27
28
# File 'lib/drymm/shapes/sum_enclosure.rb', line 26

def call_unsafe(input)
  @sum.call(input)
end

#sumObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



11
12
13
# File 'lib/drymm/shapes/sum_enclosure.rb', line 11

def sum
  @sum ||= AtomicType.new
end

#try(input, &block) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



36
37
38
# File 'lib/drymm/shapes/sum_enclosure.rb', line 36

def try(input, &block)
  @sum.try(input, &block)
end