Module: Katalyst::Healthcheck::Store::Attributes
- Included in:
- Task
- Defined in:
- lib/katalyst/healthcheck/store/attributes.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(klass) ⇒ Object
10 11 12 |
# File 'lib/katalyst/healthcheck/store/attributes.rb', line 10 def self.included(klass) klass.extend ClassMethods end |
Instance Method Details
#attributes ⇒ Object
38 39 40 |
# File 'lib/katalyst/healthcheck/store/attributes.rb', line 38 def attributes @attributes.keys.map { |k| [k, public_send(k)] }.to_h end |
#attributes=(attributes) ⇒ Object
42 43 44 45 46 47 |
# File 'lib/katalyst/healthcheck/store/attributes.rb', line 42 def attributes=(attributes) attributes.each do |k, v| public_send("#{k}=", v) end attributes end |
#initialize(attributes) ⇒ Object
33 34 35 36 |
# File 'lib/katalyst/healthcheck/store/attributes.rb', line 33 def initialize(attributes) @attributes = {} self.attributes = attributes end |