Class: OffTheGrid::Project
- Inherits:
-
NamedResource
- Object
- NamedResource
- OffTheGrid::Project
- Defined in:
- lib/off_the_grid/project.rb
Overview
A class to represent SGE Projects
Instance Attribute Summary
Attributes inherited from NamedResource
Class Method Summary collapse
-
.list ⇒ Object
Get the list of SGE projects.
Instance Method Summary collapse
- #acls ⇒ Object
- #details ⇒ Object
-
#users ⇒ Object
A Read-only list of users that can use this project Uses ACL association.
- #xacls ⇒ Object
Methods inherited from NamedResource
Methods included from GridResource
#<=>, #delete, #extract_detail, #new?, #save, #validate_before_delete, #validate_before_save
Constructor Details
This class inherits a constructor from OffTheGrid::NamedResource
Class Method Details
.list ⇒ Object
Get the list of SGE projects
5 6 7 |
# File 'lib/off_the_grid/project.rb', line 5 def self.list `qconf -sprjl`.chomp.split("\n").sort.collect { |name| new(name) } end |
Instance Method Details
#acls ⇒ Object
13 14 15 16 17 |
# File 'lib/off_the_grid/project.rb', line 13 def acls extract_detail(:acl).collect do |acl| AccessList.new(acl) end end |
#details ⇒ Object
9 10 11 |
# File 'lib/off_the_grid/project.rb', line 9 def details `qconf -sprj #{name}`.chomp end |
#users ⇒ Object
A Read-only list of users that can use this project Uses ACL association
27 28 29 |
# File 'lib/off_the_grid/project.rb', line 27 def users acls.map(&:users).flatten.uniq end |
#xacls ⇒ Object
19 20 21 22 23 |
# File 'lib/off_the_grid/project.rb', line 19 def xacls extract_detail(:xacl).collect do |acl| AccessList.new(acl) end end |