Class: Scalarium::Cloud::Rol

Inherits:
Resource
  • Object
show all
Defined in:
lib/scalarium/rol.rb

Instance Method Summary collapse

Methods inherited from Resource

#id

Methods included from Api

#get, #post

Constructor Details

#initialize(token, cloud, hash) ⇒ Rol

Returns a new instance of Rol.



6
7
8
9
# File 'lib/scalarium/rol.rb', line 6

def initialize(token, cloud, hash)
  super(token,hash)
  @cloud = cloud
end

Instance Method Details

#instancesObject



11
12
13
# File 'lib/scalarium/rol.rb', line 11

def instances
  @cloud.instances.select{|i| i.role_ids.include?(self.id)}
end