Class: Faas::User
- Inherits:
-
Object
- Object
- Faas::User
- Defined in:
- lib/faas.rb
Instance Method Summary collapse
-
#initialize(hash = nil) ⇒ User
constructor
A new instance of User.
- #method_missing(symbol, *args) ⇒ Object
Constructor Details
#initialize(hash = nil) ⇒ User
Returns a new instance of User.
122 123 124 |
# File 'lib/faas.rb', line 122 def initialize(hash=nil) @hash = hash || {} end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(symbol, *args) ⇒ Object
126 127 128 129 130 131 132 133 |
# File 'lib/faas.rb', line 126 def method_missing(symbol, *args) key = symbol.to_s if args.empty? && @hash.has_key?(symbol.to_s) @hash[symbol.to_s] else super end end |