Class: When::Parts::Resource::Element
- Inherits:
-
Object
- Object
- When::Parts::Resource::Element
- Defined in:
- lib/when_exe/parts/resource.rb
Instance Attribute Summary collapse
-
#attribute ⇒ Object
readonly
Returns the value of attribute attribute.
-
#marked ⇒ Object
readonly
Returns the value of attribute marked.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#object ⇒ Object
readonly
Returns the value of attribute object.
-
#predicate ⇒ Object
readonly
Returns the value of attribute predicate.
Instance Method Summary collapse
-
#initialize(key, object = nil, marked = nil) ⇒ Element
constructor
A new instance of Element.
Constructor Details
#initialize(key, object = nil, marked = nil) ⇒ Element
Returns a new instance of Element.
29 30 31 32 33 34 35 |
# File 'lib/when_exe/parts/resource.rb', line 29 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
#attribute ⇒ Object (readonly)
Returns the value of attribute attribute.
25 26 27 |
# File 'lib/when_exe/parts/resource.rb', line 25 def attribute @attribute end |
#marked ⇒ Object (readonly)
Returns the value of attribute marked.
27 28 29 |
# File 'lib/when_exe/parts/resource.rb', line 27 def marked @marked end |
#namespace ⇒ Object
Returns the value of attribute namespace.
26 27 28 |
# File 'lib/when_exe/parts/resource.rb', line 26 def namespace @namespace end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
24 25 26 |
# File 'lib/when_exe/parts/resource.rb', line 24 def object @object end |
#predicate ⇒ Object (readonly)
Returns the value of attribute predicate.
23 24 25 |
# File 'lib/when_exe/parts/resource.rb', line 23 def predicate @predicate end |