Module: CouchRest::Model::PropertyProtection::ClassMethods
- Defined in:
- lib/couchrest/model/property_protection.rb
Instance Method Summary collapse
Instance Method Details
#accessible_properties ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/couchrest/model/property_protection.rb', line 36 def accessible_properties props = properties.select { |prop| prop.[:accessible] } if props.empty? props = properties.select { |prop| !prop.[:protected] } end props end |
#protected_properties ⇒ Object
44 45 46 47 |
# File 'lib/couchrest/model/property_protection.rb', line 44 def protected_properties accessibles = accessible_properties properties.reject { |prop| accessibles.include?(prop) } end |