Class: Fragmentary::UserWidget
- Defined in:
- lib/fragmentary/widget.rb
Instance Attribute Summary collapse
-
#current_user ⇒ Object
readonly
Returns the value of attribute current_user.
Attributes inherited from Widget
Instance Method Summary collapse
- #_content ⇒ Object
-
#initialize(template, key) ⇒ UserWidget
constructor
A new instance of UserWidget.
Methods inherited from Widget
inherited, #pattern, subclasses
Constructor Details
#initialize(template, key) ⇒ UserWidget
Returns a new instance of UserWidget.
43 44 45 46 |
# File 'lib/fragmentary/widget.rb', line 43 def initialize(template, key) super @current_user = Fragmentary::Template.new(template).current_user end |
Instance Attribute Details
#current_user ⇒ Object (readonly)
Returns the value of attribute current_user.
41 42 43 |
# File 'lib/fragmentary/widget.rb', line 41 def current_user @current_user end |
Instance Method Details
#_content ⇒ Object
48 49 50 |
# File 'lib/fragmentary/widget.rb', line 48 def _content match ? user_content : nil end |