Class: Super::Panel
- Inherits:
-
Object
- Object
- Super::Panel
- Includes:
- Super::Partial::Resolving
- Defined in:
- lib/super/panel.rb
Instance Attribute Summary collapse
-
#parts ⇒ Object
readonly
Returns the value of attribute parts.
Instance Method Summary collapse
-
#initialize(*parts) ⇒ Panel
constructor
A new instance of Panel.
- #resolve(template, block) ⇒ Object
- #resolved_parts ⇒ Object
- #to_partial_path ⇒ Object
Methods included from Super::Partial::Resolving
Constructor Details
#initialize(*parts) ⇒ Panel
Returns a new instance of Panel.
9 10 11 12 13 14 15 |
# File 'lib/super/panel.rb', line 9 def initialize(*parts) if block_given? @parts = Array.new(yield) end @parts = parts end |
Instance Attribute Details
#parts ⇒ Object (readonly)
Returns the value of attribute parts.
17 18 19 |
# File 'lib/super/panel.rb', line 17 def parts @parts end |
Instance Method Details
#resolve(template, block) ⇒ Object
19 20 21 22 |
# File 'lib/super/panel.rb', line 19 def resolve(template, block) @resolved_parts ||= resolve_for_rendering(template, parts, block) self end |
#resolved_parts ⇒ Object
24 25 26 |
# File 'lib/super/panel.rb', line 24 def resolved_parts @resolved_parts || [] end |
#to_partial_path ⇒ Object
28 29 30 |
# File 'lib/super/panel.rb', line 28 def to_partial_path "panel" end |