Class: ActionText::Editor::Tag
- Defined in:
- actiontext/lib/action_text/editor.rb
Overview
:nodoc:
Direct Known Subclasses
Instance Attribute Summary collapse
-
#editor_name ⇒ Object
readonly
Returns the value of attribute editor_name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #element_name ⇒ Object
-
#initialize(editor_name, options = {}) ⇒ Tag
constructor
A new instance of Tag.
- #render_in(view_context) ⇒ Object
Constructor Details
#initialize(editor_name, options = {}) ⇒ Tag
Returns a new instance of Tag.
61 62 63 64 |
# File 'actiontext/lib/action_text/editor.rb', line 61 def initialize(editor_name, = {}) @editor_name = editor_name @options = end |
Instance Attribute Details
#editor_name ⇒ Object (readonly)
Returns the value of attribute editor_name.
58 59 60 |
# File 'actiontext/lib/action_text/editor.rb', line 58 def editor_name @editor_name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
59 60 61 |
# File 'actiontext/lib/action_text/editor.rb', line 59 def @options end |
Instance Method Details
#element_name ⇒ Object
66 67 68 |
# File 'actiontext/lib/action_text/editor.rb', line 66 def element_name "#{editor_name}-editor" end |
#render_in(view_context) ⇒ Object
70 71 72 73 74 |
# File 'actiontext/lib/action_text/editor.rb', line 70 def render_in(view_context) [:class] ||= "#{editor_name}-content" view_context.content_tag(element_name, nil, ) end |