Sha256: 98d7c86546aaf7ab04a5f37afbf9194bfde43991c71f1ee94821d9ae6cdfb616
Contents?: true
Size: 583 Bytes
Versions: 2
Compression:
Stored size: 583 Bytes
Contents
class Restfulie::Common::Builder::Rules::Namespace < Hash attr_reader :namespace attr_reader :uri def initialize(ns, uri, *args) @namespace = ns.to_sym self.uri = uri super(*args) end def uri=(value) raise Restfulie::Common::Error::NameSpaceError.new('Namespace can not be blank uri.') if value.blank? @uri = value end def method_missing(symbol, *args) if ((key = symbol.to_s.match(/(.*)=/)) && args.size >= 1) self[key[1].to_sym] = args.first elsif(keys.include?(symbol)) self[symbol] else super end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
restfulie-0.7.1 | lib/restfulie/common/builder/rules/namespace.rb |
restfulie-0.7.0 | lib/restfulie/common/builder/rules/namespace.rb |