Class: Nick
Overview
this file is part of manqod manqod is distributed under the CDDL licence the author of manqod is Dobai-Pataky Balint([email protected])
Instance Method Summary collapse
- #get_nick ⇒ Object
- #ingroup?(group_name) ⇒ Boolean
- #ingroup_id?(group_id) ⇒ Boolean
- #nick_id ⇒ Object
- #set_nick(new_nick) ⇒ Object
Instance Method Details
#get_nick ⇒ Object
15 16 17 |
# File 'lib/Common/Nick.rb', line 15 def get_nick @nick end |
#ingroup?(group_name) ⇒ Boolean
26 27 28 29 |
# File 'lib/Common/Nick.rb', line 26 def ingroup?(group_name) @mygroups=ManqodDB.instance.manqod_db.mygroups(@nick).clone if @mygroups.nil? @mygroups.has_value?(group_name) end |
#ingroup_id?(group_id) ⇒ Boolean
30 31 32 33 |
# File 'lib/Common/Nick.rb', line 30 def ingroup_id?(group_id) @mygroups=ManqodDB.instance.manqod_db.mygroups(@nick).clone if @mygroups.nil? @mygroups.has_key?(group_id.to_i) end |
#nick_id ⇒ Object
19 20 21 22 23 24 |
# File 'lib/Common/Nick.rb', line 19 def nick_id if @nickid.nil? @nickid=ManqodDB.instance.manqod_db.admin.qrow("select id from users where nick='#{@nick}'")["id"] end @nickid end |
#set_nick(new_nick) ⇒ Object
11 12 13 |
# File 'lib/Common/Nick.rb', line 11 def set_nick(new_nick) @nick=new_nick end |