Class: LucidWorks::Role
- Inherits:
-
Base
- Object
- Base
- LucidWorks::Role
show all
- Defined in:
- lib/lucid_works/role.rb
Constant Summary
Utils::BoolConverter::FALSE_VALUES, Utils::BoolConverter::TRUE_VALUES
Instance Attribute Summary
Attributes inherited from Base
#attributes, #id, #parent, #persisted, #raw_response, #response_data
Instance Method Summary
collapse
Methods inherited from Base
all, #collection_url, collection_url, create, #destroy, extract_parent_from_options, find, first, human_attribute_value, #human_attribute_value, #initialize, #inspect, last, #member_url, #persisted?, #read_attribute_for_validation, #save, schema, singleton_name, to_select, #update_attributes
#model_name
#to_bool
Instance Method Details
#filters ⇒ Object
20
21
22
23
|
# File 'lib/lucid_works/role.rb', line 20
def filters
@attributes[:filters]
end
|
#filters=(val) ⇒ Object
40
41
42
43
44
|
# File 'lib/lucid_works/role.rb', line 40
def filters=(val)
@attributes[:filters] = string_or_array(val, /\r+/) rescue "Can't interpret #{val.class} as list of groups"
end
|
#filters_for_text_area ⇒ Object
25
26
27
|
# File 'lib/lucid_works/role.rb', line 25
def filters_for_text_area
@attributes[:filters].to_a.join("\n")
end
|
#groups ⇒ Object
16
17
18
|
# File 'lib/lucid_works/role.rb', line 16
def groups
@attributes[:groups]
end
|
#groups=(val) ⇒ Object
36
37
38
|
# File 'lib/lucid_works/role.rb', line 36
def groups=(val)
@attributes[:groups] = string_or_array(val, /[\s,]+/) rescue "Can't interpret #{val.class} as list of groups"
end
|
#users ⇒ Object
12
13
14
|
# File 'lib/lucid_works/role.rb', line 12
def users
@attributes[:users]
end
|
#users=(val) ⇒ Object
Accept a comma or space separated list of users, convert to array
32
33
34
|
# File 'lib/lucid_works/role.rb', line 32
def users=(val)
@attributes[:users] = string_or_array(val, /[\s,]+/) rescue "Can't interpret #{val.class} as list of users"
end
|