Class: Billomat::SingletonBase
Class Method Summary
collapse
Instance Method Summary
collapse
#save
Methods inherited from Base
coll_p, el_p, inherited
Class Method Details
.all ⇒ Object
Prevent collection methods
202
203
204
|
# File 'lib/billomat-rb.rb', line 202
def self.all
raise MethodNotAvailable, "Method not supported on #{self.class.name}"
end
|
.collection_name ⇒ Object
169
170
171
|
# File 'lib/billomat-rb.rb', line 169
def collection_name
element_name
end
|
.collection_path(prefix_options = {}, query_options = nil) ⇒ Object
178
179
180
181
|
# 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) ⇒ Object
173
174
175
176
|
# 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 ⇒ Object
190
191
192
|
# File 'lib/billomat-rb.rb', line 190
def self.first
self.find
end
|
.last ⇒ Object
194
195
196
|
# File 'lib/billomat-rb.rb', line 194
def self.last
self.find
end
|
Instance Method Details
#find ⇒ Object
Also known as:
first, last
184
185
186
187
188
|
# File 'lib/billomat-rb.rb', line 184
def find
super(1)
end
|