Sha256: d2d2b93bff93ba0774b8b76b45cf945c0d7ca6b7da767ddeaf6b008a641b9d30

Contents?: true

Size: 220 Bytes

Versions: 13

Compression:

Stored size: 220 Bytes

Contents

# frozen_string_literal: true

module Initializable
  def initialize(params = {})
    params.each do |key, value|
      setter = "#{key}="
      send(setter, value) if respond_to?(setter.to_sym, false)
    end
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
runa-ruby-client-0.3.1 lib/runa/models/initializable.rb
runa-ruby-client-0.3.0 lib/runa/models/initializable.rb
runa-ruby-client-0.2.1 lib/runa/models/initializable.rb
runa-ruby-client-0.1.0 lib/runa/models/initializable.rb
wegift-ruby-client-1.10.2 lib/wegift/models/initializable.rb
wegift-ruby-client-1.10.0 lib/wegift/models/initializable.rb
wegift-ruby-client-1.9.1 lib/wegift/models/initializable.rb
wegift-ruby-client-1.9.0 lib/wegift/models/initializable.rb
wegift-ruby-client-1.8.4 lib/wegift/models/initializable.rb
wegift-ruby-client-1.8.3 lib/wegift/models/initializable.rb
wegift-ruby-client-1.8.2 lib/wegift/models/initializable.rb
wegift-ruby-client-1.8.1 lib/wegift/models/initializable.rb
wegift-ruby-client-1.8.0 lib/wegift/models/initializable.rb