Module: RsyncConfig::Propertiable::ClassMethods
- Defined in:
- lib/rsync_config/propertiable.rb
Instance Method Summary collapse
- #allow_properties(*properties) ⇒ Object
- #allowed_properties ⇒ Object
- #allowed_property?(property) ⇒ Boolean
Instance Method Details
#allow_properties(*properties) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/rsync_config/propertiable.rb', line 11 def allow_properties *properties properties.each do |property| property = property.to_s if property.is_a? Symbol property = property.downcase.strip.gsub(/_/, ' ') allowed_properties.push property end end |
#allowed_properties ⇒ Object
19 20 21 |
# File 'lib/rsync_config/propertiable.rb', line 19 def allowed_properties @allowed_properties ||= [] end |
#allowed_property?(property) ⇒ Boolean
23 24 25 |
# File 'lib/rsync_config/propertiable.rb', line 23 def allowed_property? property allowed_properties.include? property end |