Class: Mite::SingletonBase
Class Method Summary
collapse
Instance Method Summary
collapse
#create, #destroy, #save
Methods inherited from Base
all, first, inherited, last
Class Method Details
.collection_name ⇒ Object
153
154
155
|
# File 'lib/mite-rb.rb', line 153
def collection_name
element_name
end
|
.collection_path(prefix_options = {}, query_options = nil) ⇒ Object
162
163
164
165
|
# File 'lib/mite-rb.rb', line 162
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}.#{format.extension}#{query_string(query_options)}"
end
|
.element_path(id, prefix_options = {}, query_options = nil) ⇒ Object
157
158
159
160
|
# File 'lib/mite-rb.rb', line 157
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}.#{format.extension}#{query_string(query_options)}"
end
|
Instance Method Details
#all ⇒ Object
Prevent collection methods
176
177
178
|
# File 'lib/mite-rb.rb', line 176
def all
raise MethodNotAvaible, "Method not supported on #{self.class.name}"
end
|
#find ⇒ Object
Also known as:
first, last
168
169
170
|
# File 'lib/mite-rb.rb', line 168
def find
super(1)
end
|