Module: RAWG::Utils
- Included in:
- Game
- Defined in:
- lib/rawg/utils.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
5 6 7 |
# File 'lib/rawg/utils.rb', line 5 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#assign_attributes(attrs) ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/rawg/utils.rb', line 27 def assign_attributes(attrs) return unless attrs.is_a?(Hash) attrs.each do |attr, value| send("#{attr}=", value) if respond_to?("#{attr}=") end end |