Class: Ayadn::UserMetaObject
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#input ⇒ Object
readonly
Returns the value of attribute input.
Instance Method Summary collapse
-
#initialize(hash, username = nil) ⇒ UserMetaObject
constructor
A new instance of UserMetaObject.
Constructor Details
#initialize(hash, username = nil) ⇒ UserMetaObject
Returns a new instance of UserMetaObject.
8 9 10 11 12 13 14 15 16 |
# File 'lib/ayadn/user_object.rb', line 8 def initialize hash, username = nil @input = hash["meta"].nil? ? {} : hash["meta"] @code = @input["code"] if code == 404 Status.new.user_404(username) Errors.info("User #{username} doesn't exist") exit end end |