Class: Bcash::Notification
- Inherits:
-
Object
- Object
- Bcash::Notification
- Defined in:
- lib/bcash/notification.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
Returns the value of attribute params.
Instance Method Summary collapse
- #create_bcash_attrs ⇒ Object
-
#initialize(params) ⇒ Notification
constructor
A new instance of Notification.
Constructor Details
#initialize(params) ⇒ Notification
Returns a new instance of Notification.
5 6 7 8 9 |
# File 'lib/bcash/notification.rb', line 5 def initialize(params) @params = params create_bcash_attrs end |
Instance Attribute Details
#params ⇒ Object
Returns the value of attribute params.
3 4 5 |
# File 'lib/bcash/notification.rb', line 3 def params @params end |
Instance Method Details
#create_bcash_attrs ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/bcash/notification.rb', line 11 def create_bcash_attrs @params.each do |key, value| self.instance_variable_set "@#{key}", value self.class.class_eval do attr_reader key end end end |