Class: TinyIRC::Group
- Inherits:
-
Object
- Object
- TinyIRC::Group
- Defined in:
- lib/tinyirc/perms.rb
Class Attribute Summary collapse
-
.log ⇒ Object
readonly
Returns the value of attribute log.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#perms ⇒ Object
readonly
Returns the value of attribute perms.
Instance Method Summary collapse
-
#initialize(name) ⇒ Group
constructor
A new instance of Group.
- #perm(plugin, command, branch) ⇒ Object
Constructor Details
#initialize(name) ⇒ Group
Returns a new instance of Group.
34 35 36 37 38 |
# File 'lib/tinyirc/perms.rb', line 34 def initialize(name) @name = name @perms = Set.new TinyIRC::Group::log.write "groups += #{name}" end |
Class Attribute Details
.log ⇒ Object (readonly)
Returns the value of attribute log.
27 28 29 |
# File 'lib/tinyirc/perms.rb', line 27 def log @log end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
32 33 34 |
# File 'lib/tinyirc/perms.rb', line 32 def name @name end |
#perms ⇒ Object (readonly)
Returns the value of attribute perms.
32 33 34 |
# File 'lib/tinyirc/perms.rb', line 32 def perms @perms end |
Instance Method Details
#perm(plugin, command, branch) ⇒ Object
40 41 42 43 44 |
# File 'lib/tinyirc/perms.rb', line 40 def perm(plugin, command, branch) if @perms.add?(TinyIRC::Permission.new(plugin, command, branch)) TinyIRC::Group::log.write "#{@name} += #{plugin}/#{command}/#{branch}" end end |