Sha256: 17daeaae6b3457856b95feb7cb8c6bc8a2360b76f061c38155ad9360d999f1bc

Contents?: true

Size: 529 Bytes

Versions: 15

Compression:

Stored size: 529 Bytes

Contents

# frozen_string_literal: true

class Sinclair
  class DummyClassBuilder < Sinclair
    def init
      add_class_method(:blocked) { 1 }
      add_class_method(:defined, "@value = value + #{options_object&.increment || 1}")
      add_class_method(:sum, 'x + y', parameters: %i[x y])
      add_class_method(:value, '@value ||= 0')
      add_class_method(:type_block, type: :block) { 3 }
      add_class_method(:type_string, '10', type: :string)
      add_class_method(:attr_accessor, :some_attribute, type: :call)
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
sinclair-2.1.1 spec/support/models/dummy_class_builder.rb
sinclair-2.1.0 spec/support/models/dummy_class_builder.rb
sinclair-2.0.1 spec/support/models/dummy_class_builder.rb
sinclair-2.0.0 spec/support/models/dummy_class_builder.rb
sinclair-1.16.3 spec/support/models/dummy_class_builder.rb
sinclair-1.16.2 spec/support/models/dummy_class_builder.rb
sinclair-1.16.1 spec/support/models/dummy_class_builder.rb
sinclair-1.16.0 spec/support/models/dummy_class_builder.rb
sinclair-1.15.0 spec/support/models/dummy_class_builder.rb
sinclair-1.14.2 spec/support/models/dummy_class_builder.rb
sinclair-1.14.1 spec/support/models/dummy_class_builder.rb
sinclair-1.14.0 spec/support/models/dummy_class_builder.rb
sinclair-1.13.0 spec/support/models/dummy_class_builder.rb
sinclair-1.12.1 spec/support/models/dummy_class_builder.rb
sinclair-1.12.0 spec/support/models/dummy_class_builder.rb