Class: Hyalite::ElementObject

Inherits:
Object
  • Object
show all
Defined in:
lib/hyalite/element.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, key, ref, owner, props) ⇒ ElementObject

Returns a new instance of ElementObject.



6
7
8
9
10
11
12
# File 'lib/hyalite/element.rb', line 6

def initialize(type, key, ref, owner, props)
  @type = type
  @key = key
  @ref = ref
  @owner = owner
  @props = props
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



3
4
5
# File 'lib/hyalite/element.rb', line 3

def key
  @key
end

#ownerObject (readonly)

Returns the value of attribute owner.



3
4
5
# File 'lib/hyalite/element.rb', line 3

def owner
  @owner
end

#parentObject

Returns the value of attribute parent.



4
5
6
# File 'lib/hyalite/element.rb', line 4

def parent
  @parent
end

#propsObject (readonly)

Returns the value of attribute props.



3
4
5
# File 'lib/hyalite/element.rb', line 3

def props
  @props
end

#refObject (readonly)

Returns the value of attribute ref.



3
4
5
# File 'lib/hyalite/element.rb', line 3

def ref
  @ref
end

#typeObject (readonly)

Returns the value of attribute type.



3
4
5
# File 'lib/hyalite/element.rb', line 3

def type
  @type
end

Instance Method Details

#inspectObject



14
15
16
# File 'lib/hyalite/element.rb', line 14

def inspect
  "<#{type} #{props && props.inspect} />"
end