class Billomat::SingletonBase

Public Class Methods

all() click to toggle source

Prevent collection methods

# File lib/billomat-rb.rb, line 202
def self.all
  raise MethodNotAvailable, "Method not supported on #{self.class.name}"
end
collection_name() click to toggle source
# File lib/billomat-rb.rb, line 169
def collection_name
  element_name
end
collection_path(prefix_options = {}, query_options = nil) click to toggle source
# File lib/billomat-rb.rb, line 178
def collection_path(prefix_options = {}, query_options = nil)
  prefix_options, query_options = split_options(prefix_options) if query_options.nil?
  "#{prefix(prefix_options)}#{collection_name}#{query_string(query_options)}"
end
element_path(id,prefix_options = {}, query_options = nil) click to toggle source
# File lib/billomat-rb.rb, line 173
def element_path(id,prefix_options = {}, query_options = nil)
  prefix_options, query_options = split_options(prefix_options) if query_options.nil?
  "#{prefix(prefix_options)}#{collection_name}#{query_string(query_options)}"
end
first() click to toggle source
# File lib/billomat-rb.rb, line 190
def self.first
  self.find
end
last() click to toggle source
# File lib/billomat-rb.rb, line 194
def self.last
  self.find
end

Public Instance Methods

find() click to toggle source
Calls superclass method
# File lib/billomat-rb.rb, line 184
def find
  # TODO: Fetch whether ids where given or not
  # and get the wanted one in those cases
  super(1)
end
Also aliased as: first, last
first()
Alias for: find
last()
Alias for: find