Module: Spice::Connection::Roles
- Included in:
- Spice::Connection
- Defined in:
- lib/spice/connection/roles.rb
Instance Method Summary collapse
-
#role(name) ⇒ Spice::Role
Retrieve a single role.
-
#roles(options = Mash.new) ⇒ Array<Spice::Role>
A collection of roles.
Instance Method Details
#role(name) ⇒ Spice::Role
Retrieve a single role
20 21 22 23 |
# File 'lib/spice/connection/roles.rb', line 20 def role(name) attributes = get("/roles/#{name}") Spice::Role.new(attributes) end |
#roles(options = Mash.new) ⇒ Array<Spice::Role>
A collection of roles
10 11 12 |
# File 'lib/spice/connection/roles.rb', line 10 def roles(=Mash.new) search('role', ) end |