Class: Hypo::SimpleComponent
- Inherits:
-
Object
- Object
- Hypo::SimpleComponent
- Defined in:
- lib/hypo/simple_component.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(object, container, name) ⇒ SimpleComponent
constructor
A new instance of SimpleComponent.
- #instance ⇒ Object
Constructor Details
#initialize(object, container, name) ⇒ SimpleComponent
Returns a new instance of SimpleComponent.
5 6 7 8 9 10 11 |
# File 'lib/hypo/simple_component.rb', line 5 def initialize(object, container, name) raise ContainerError, 'Registered object should have a name' if name.nil? @object = object @name = name @container = container end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/hypo/simple_component.rb', line 3 def name @name end |
Instance Method Details
#instance ⇒ Object
13 14 15 |
# File 'lib/hypo/simple_component.rb', line 13 def instance @object end |