Sha256: 17f5e42fa1bcab4126da72dd434c3e3eaebf5ab5608a97e0ea66b983ba273925
Contents?: true
Size: 787 Bytes
Versions: 1
Compression:
Stored size: 787 Bytes
Contents
module Rod module Rest class PropertyMetadata attr_reader :name, :symbolic_name # Creates new property metadata using the +name+ and +options+. def initialize(name, options) raise ArgumentError.new("nil name") if name.nil? @name = name.to_s @symbolic_name = @name.to_sym @index = options[:index] end # Returns true if the property is indexed. def indexed? !! @index end # Detailed description of the porperty, i.e. # Rod::Rest::PropertyMetadata<name> def inspect indexed = indexed? ? ",indexed" : "" "#{self.class}<#{@name}#{indexed}>" end # Short description of the poperty. def to_s "'#{@name}' property" end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rod-rest-0.5.0 | lib/rod/rest/property_metadata.rb |