lib/duracloud/properties.rb in duracloud-client-0.7.0 vs lib/duracloud/properties.rb in duracloud-client-0.7.1

- old
+ new

@@ -7,30 +7,24 @@ # Encapsulates Duracloud "properties" which are transmitted via HTTP headers. # class Properties < Hashie::Mash PREFIX = "x-dura-meta-".freeze - PREFIX_RE = /\A#{PREFIX}/i # Is the property name valid? # @param prop [String] the property name # @return [Boolean] def self.property?(prop) - !!( PREFIX_RE =~ prop.to_s ) + prop.to_s.start_with?(PREFIX) end def initialize(source = nil, default = nil, &block) source.select! { |k, v| property?(k) } if source super end def property?(prop) self.class.property?(prop) - end - - # @api private - def convert_key(key) - force_ascii(key) end # @api private def convert_value(value, _ = nil) case value