Class: Compo::Branches::Constant
- Inherits:
-
Leaf
- Object
- Composites::Leaf
- Leaf
- Compo::Branches::Constant
- Defined in:
- lib/compo/branches/constant.rb
Overview
A Leaf containing a constant value
The value can be retrieved using #value.
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the current value of this Constant.
Attributes included from Mixins::ParentTracker
Instance Method Summary collapse
-
#initialize(value) ⇒ Constant
constructor
Initialises the Constant.
Methods included from Branch
Methods included from Mixins::UrlReferenceable
Methods included from Mixins::ParentTracker
Methods included from Mixins::Movable
Methods inherited from Composites::Leaf
Methods included from Composites::Composite
#add, #get_child, #get_child_such_that, #on_node, #remove, #remove_id
Constructor Details
#initialize(value) ⇒ Constant
Initialises the Constant
17 18 19 20 |
# File 'lib/compo/branches/constant.rb', line 17 def initialize(value) super() @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the current value of this Constant
31 32 33 |
# File 'lib/compo/branches/constant.rb', line 31 def value @value end |