Class: ActiveAdmin::Annotations::CopyText
- Inherits:
-
Object
- Object
- ActiveAdmin::Annotations::CopyText
- Defined in:
- lib/activeadmin/annotations/copy_text.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(annotation) ⇒ CopyText
constructor
A new instance of CopyText.
- #to_s ⇒ Object
Constructor Details
#initialize(annotation) ⇒ CopyText
Returns a new instance of CopyText.
11 12 13 14 |
# File 'lib/activeadmin/annotations/copy_text.rb', line 11 def initialize(annotation) @annotation = annotation @review = annotation.annotation_review end |
Class Method Details
.for(annotation) ⇒ Object
7 8 9 |
# File 'lib/activeadmin/annotations/copy_text.rb', line 7 def self.for(annotation) new(annotation).to_s end |
Instance Method Details
#to_s ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/activeadmin/annotations/copy_text.rb', line 16 def to_s sections = [] instructions = copy_instructions sections << instructions if instructions.present? sections << review_section sections << context_section sections << annotation_section sections.join("\n\n") end |