Class: When::Parts::Resource::Element

Inherits:
Object
  • Object
show all
Defined in:
lib/when_exe/parts/resource.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, object = nil, marked = nil) ⇒ Element

Returns a new instance of Element.



57
58
59
60
61
62
63
# File 'lib/when_exe/parts/resource.rb', line 57

def initialize(key, object=nil, marked=nil)
  key = key.downcase.gsub(/-/,'_') if (key==key.upcase)
  @predicate, @namespace = key.split(/:/).reverse
  @object    = object
  @marked    = marked
  @attribute = {}
end

Instance Attribute Details

#attributeObject (readonly)

Returns the value of attribute attribute.



53
54
55
# File 'lib/when_exe/parts/resource.rb', line 53

def attribute
  @attribute
end

#markedObject (readonly)

Returns the value of attribute marked.



55
56
57
# File 'lib/when_exe/parts/resource.rb', line 55

def marked
  @marked
end

#namespaceObject

Returns the value of attribute namespace.



54
55
56
# File 'lib/when_exe/parts/resource.rb', line 54

def namespace
  @namespace
end

#objectObject (readonly)

Returns the value of attribute object.



52
53
54
# File 'lib/when_exe/parts/resource.rb', line 52

def object
  @object
end

#predicateObject (readonly)

Returns the value of attribute predicate.



51
52
53
# File 'lib/when_exe/parts/resource.rb', line 51

def predicate
  @predicate
end