Module: Hahamut::Support::Attributes
- Included in:
- Event, Message::Base
- Defined in:
- lib/hahamut/support/attributes.rb
Overview
Define attributes API
Defined Under Namespace
Modules: ClassMethods
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
30 31 32 |
# File 'lib/hahamut/support/attributes.rb', line 30 def attributes @attributes end |
Class Method Details
.included(other) ⇒ Object
8 9 10 |
# File 'lib/hahamut/support/attributes.rb', line 8 def included(other) other.extend ClassMethods end |
Instance Method Details
#assign_attributes(attributes) ⇒ Object
32 33 34 35 36 |
# File 'lib/hahamut/support/attributes.rb', line 32 def assign_attributes(attributes) attributes.each do |attr, value| send("#{attr}=", value) end end |