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.
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
#attribute ⇒ Object (readonly)
Returns the value of attribute attribute.
53 54 55 |
# File 'lib/when_exe/parts/resource.rb', line 53 def attribute @attribute end |
#marked ⇒ Object (readonly)
Returns the value of attribute marked.
55 56 57 |
# File 'lib/when_exe/parts/resource.rb', line 55 def marked @marked end |
#namespace ⇒ Object
Returns the value of attribute namespace.
54 55 56 |
# File 'lib/when_exe/parts/resource.rb', line 54 def namespace @namespace end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
52 53 54 |
# File 'lib/when_exe/parts/resource.rb', line 52 def object @object end |
#predicate ⇒ Object (readonly)
Returns the value of attribute predicate.
51 52 53 |
# File 'lib/when_exe/parts/resource.rb', line 51 def predicate @predicate end |