Class: Deadwood::Katello::User

Inherits:
Base
  • Object
show all
Defined in:
lib/deadwood/model/user.rb

Instance Method Summary collapse

Methods inherited from Base

collection_path, config, config=, element_path, get, instantiate_collection, #load_attributes_from_response, #query_string, use_oauth?

Instance Method Details

#collection_path(prefix_options = {}, query_options = nil) ⇒ Object



24
25
26
27
28
29
# File 'lib/deadwood/model/user.rb', line 24

def collection_path(prefix_options = {}, query_options = nil)
  prefix_options, query_options = split_options(prefix_options) if query_options.nil?
  query_options.merge!(self.attributes)
  self.attributes.clear
  "#{self.class.prefix(prefix_options)}#{self.class.collection_name}#{query_string(query_options)}"
end

#encode(options = {}) ⇒ Object



31
32
33
# File 'lib/deadwood/model/user.rb', line 31

def encode(options={})
  self.attributes.empty? ? nil : send("to_#{self.class.format.extension}", options)
end