Sha256: 8e3ef8889424d84537dcb1cc46e93ef5a42d82f492758d34139b79358479f623

Contents?: true

Size: 895 Bytes

Versions: 5

Compression:

Stored size: 895 Bytes

Contents

module Restfulie
  module Common
    module Representation
      module Atom
        class Category < XML    
          def initialize(options_or_obj)
            if options_or_obj.kind_of?(Hash)
              @doc = Nokogiri::XML::Document.new()
              options_or_obj = create_element("category", options_or_obj)
            end
            super(options_or_obj)
          end
          
          def term
            @doc["term"]
          end
          
          def term=(value)
            @doc["term"] = value
          end
          
          def scheme
            @doc["scheme"]
          end
          
          def scheme=(value)
            @doc["scheme"] = value
          end
      
          def label
            @doc["label"]
          end
          
          def label=(value)
            @doc["label"] = value
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
restfulie-1.0.0.beta1 lib/restfulie/common/representation/atom/category.rb
restfulie-0.1.0.beta1 lib/restfulie/common/representation/atom/category.rb
restfulie-0.9.3 lib/restfulie/common/representation/atom/category.rb
restfulie-0.9.1 lib/restfulie/common/representation/atom/category.rb
restfulie-0.8.1 lib/restfulie/common/representation/atom/category.rb