Sha256: f1ea2576bd77d1cd41638427be3a84cc92d647c64ef20d97c1daa77e86a43376
Contents?: true
Size: 539 Bytes
Versions: 2
Compression:
Stored size: 539 Bytes
Contents
# frozen_string_literal: true module Mitake module Model # @since 0.1.0 # @api private module Attributes # @since 0.1.0 # @api private def initialize(attributes = {}) assign_attributes(attributes) end # Assign attribute by hash # # @param attributes [Hash] the attributes to assignment # # @since 0.1.0 def assign_attributes(attributes = {}) attributes.each do |key, value| send("#{key}=", value) end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mitake-0.1.1 | lib/mitake/model/attributes.rb |
mitake-0.1.0 | lib/mitake/model/attributes.rb |