Class: InsightUser
- Inherits:
-
Object
- Object
- InsightUser
- Defined in:
- app/models/insight_user.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(multipass) ⇒ InsightUser
constructor
A new instance of InsightUser.
- #method_missing(method, *args, &block) ⇒ Object
Constructor Details
#initialize(multipass) ⇒ InsightUser
Returns a new instance of InsightUser.
3 4 5 |
# File 'app/models/insight_user.rb', line 3 def initialize(multipass) @multipass_attributes = self.class.multipass.decode(multipass) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
7 8 9 10 11 12 13 |
# File 'app/models/insight_user.rb', line 7 def method_missing(method, *args, &block) if @multipass_attributes.keys.include?(method) @multipass_attributes[method] else super end end |
Class Method Details
.multipass ⇒ Object
15 16 17 |
# File 'app/models/insight_user.rb', line 15 def self.multipass @multipass ||= MultiPass.new('fatfree', 'abc') end |