Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 187c6ee768
Fetching contributors…

Cannot retrieve contributors at this time

77 lines (63 sloc) 2.493 kb
using System;
using System.Text;
using System.Collections.Generic;
using IronRuby.Builtins;
using IronRuby.Runtime;
using Microsoft.Scripting;
using Microsoft.Scripting.Runtime;
namespace IronRuby.Hpricot {
[RubyClass("Elem", Inherits = typeof(BaseElement), DefineIn = typeof(Hpricot))]
public class Element : BaseElement {
public Element(ScannerState state)
: this(state.Context) {
public Element(RubyContext context)
: base(context, new ElementData()) {
public static Element Allocator(RubyClass/*!*/ self) {
return new Element(self.Context);
public static MutableString GetRawString(Element/*!*/ self) {
return self.GetData<ElementData>().Raw;
public static bool ClearRaw(Element/*!*/ self) {
self.GetData<ElementData>().Raw = null;
return true;
public static Object GetRawAttributes(Element/*!*/ self) {
return self.GetData<ElementData>().Attr;
public static void SetRawAttributes(Element/*!*/ self, Object/*!*/ rawAttributes) {
self.GetData<ElementData>().Attr = rawAttributes;
public static IList<Object> GetChildren(Element/*!*/ self) {
return self.GetData<ElementData>().Children;
public static void SetChildren(Element/*!*/ self, IList<Object>/*!*/ children) {
self.GetData<ElementData>().Children = children;
public static IHpricotDataContainer GetEtag(Element/*!*/ self) {
return self.GetData<ElementData>().ETag;
public static void SetEtag(Element/*!*/ self, IHpricotDataContainer/*!*/ etag) {
self.GetData<ElementData>().ETag = etag;
public static MutableString GetName(Element/*!*/ self) {
return self._data.Tag;
public static void SetName(Element/*!*/ self, MutableString/*!*/ name) {
self._data.Tag = name;
Jump to Line
Something went wrong with that request. Please try again.