Class: KalibroGem::Entities::RepositoryObserver

Inherits:
Model
  • Object
show all
Defined in:
lib/kalibro_gem/entities/repository_observer.rb

Instance Attribute Summary collapse

Attributes inherited from Model

#kalibro_errors

Class Method Summary collapse

Methods inherited from Model

#==, create, create_array_from_hash, create_objects_array_from_hash, #destroy, #errors=, exists?, find, #initialize, request, #save, #save!, #to_hash, to_object, to_objects_array

Methods included from RequestMethods::ClassMethods

#exists_action, #find_action, #id_params

Methods included from HashConverters

#convert_to_hash, #date_with_milliseconds, #field_to_hash

Methods included from XMLConverters

#get_xml, #xml_instance_class_name

Methods included from RequestMethods

#destroy_action, #destroy_params, #save_action, #save_params

Constructor Details

This class inherits a constructor from KalibroGem::Entities::Model

Instance Attribute Details

#emailObject

Returns the value of attribute email.



22
23
24
# File 'lib/kalibro_gem/entities/repository_observer.rb', line 22

def email
  @email
end

#idObject

Returns the value of attribute id.



22
23
24
# File 'lib/kalibro_gem/entities/repository_observer.rb', line 22

def id
  @id
end

#nameObject

Returns the value of attribute name.



22
23
24
# File 'lib/kalibro_gem/entities/repository_observer.rb', line 22

def name
  @name
end

#repository_idObject

Returns the value of attribute repository_id.



22
23
24
# File 'lib/kalibro_gem/entities/repository_observer.rb', line 22

def repository_id
  @repository_id
end

Class Method Details

.allObject



45
46
47
# File 'lib/kalibro_gem/entities/repository_observer.rb', line 45

def self.all
  create_objects_array_from_hash request(:all_repository_observers)[:repository_observer]
end

.repository_observers_of(value) ⇒ Object

FIXME: the index of the second parameter of the request must be repository_id. It can’t be fixed here until Kalibro webservice remain with this name!



41
42
43
# File 'lib/kalibro_gem/entities/repository_observer.rb', line 41

def self.repository_observers_of(value)
  create_objects_array_from_hash request(:repository_observers_of, {:repository_observer_id => value})[:repository_observer]
end