Class: Clickwrap::Presenter::Fragment
- Inherits:
-
Data
- Object
- Data
- Clickwrap::Presenter::Fragment
- Defined in:
- lib/clickwrap/presenter.rb
Overview
One statement's share of a composed sentence, already split around the place its documents go. Kept as parts rather than a template with a placeholder so a view can drop real links into the middle of a sentence without ever concatenating HTML into translated text.
Instance Attribute Summary collapse
-
#documents ⇒ Object
readonly
Returns the value of attribute documents.
-
#documents_joiner ⇒ Object
readonly
Returns the value of attribute documents_joiner.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#prefix ⇒ Object
readonly
Returns the value of attribute prefix.
-
#statement_key ⇒ Object
readonly
Returns the value of attribute statement_key.
-
#suffix ⇒ Object
readonly
Returns the value of attribute suffix.
Instance Method Summary collapse
Instance Attribute Details
#documents ⇒ Object (readonly)
Returns the value of attribute documents
43 44 45 |
# File 'lib/clickwrap/presenter.rb', line 43 def documents @documents end |
#documents_joiner ⇒ Object (readonly)
Returns the value of attribute documents_joiner
43 44 45 |
# File 'lib/clickwrap/presenter.rb', line 43 def documents_joiner @documents_joiner end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind
43 44 45 |
# File 'lib/clickwrap/presenter.rb', line 43 def kind @kind end |
#prefix ⇒ Object (readonly)
Returns the value of attribute prefix
43 44 45 |
# File 'lib/clickwrap/presenter.rb', line 43 def prefix @prefix end |
#statement_key ⇒ Object (readonly)
Returns the value of attribute statement_key
43 44 45 |
# File 'lib/clickwrap/presenter.rb', line 43 def statement_key @statement_key end |
#suffix ⇒ Object (readonly)
Returns the value of attribute suffix
43 44 45 |
# File 'lib/clickwrap/presenter.rb', line 43 def suffix @suffix end |
Instance Method Details
#to_text ⇒ Object
44 |
# File 'lib/clickwrap/presenter.rb', line 44 def to_text = "#{prefix}#{documents.map(&:label).join(documents_joiner)}#{suffix}" |