Sha256: 5ae93299ea9bc68a2fa1c1923dc1b7401935e83f1be49a6a1ee099be371859e2

Contents?: true

Size: 264 Bytes

Versions: 3

Compression:

Stored size: 264 Bytes

Contents

# frozen_string_literal: true

class ComplexBuilder < Sinclair
  def initialize(klass, value, power)
    @value = value
    @power = power

    super(klass)
  end

  def add_default
    val = @value
    pow = @power

    add_method(:result) { val**pow }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sinclair-2.1.1 spec/support/models/complex_builder.rb
sinclair-2.1.0 spec/support/models/complex_builder.rb
sinclair-2.0.1 spec/support/models/complex_builder.rb