Class: ActiveForms::Form
Instance Attribute Summary
Attributes inherited from Mapper
#attributes
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Mapper
#==, #apiVersion=, #initialize, #xmlns=
Class Method Details
.all(params = {}) ⇒ Object
7
8
9
10
11
12
13
14
|
# File 'lib/active_forms/form.rb', line 7
def all(params = {})
response = ActiveForms::Request.get("forms", params)
hashes = response["forms"]["form"]
hashes = [hashes] if hashes.is_a?(Hash)
objects = hashes.nil? ? [] : hashes.map { |attributes| new(attributes) }
end
|
Instance Method Details
#active? ⇒ Boolean
26
27
28
|
# File 'lib/active_forms/form.rb', line 26
def active?
status == "active"
end
|
#inactive? ⇒ Boolean
30
31
32
|
# File 'lib/active_forms/form.rb', line 30
def inactive?
status == "inactive"
end
|