Class: Stratify::Instapaper::Presenter
- Inherits:
-
Object
- Object
- Stratify::Instapaper::Presenter
- Defined in:
- lib/stratify-instapaper/presenter.rb
Instance Method Summary collapse
- #details ⇒ Object
- #domain ⇒ Object
-
#initialize(activity) ⇒ Presenter
constructor
A new instance of Presenter.
- #summary ⇒ Object
Constructor Details
#initialize(activity) ⇒ Presenter
Returns a new instance of Presenter.
6 7 8 |
# File 'lib/stratify-instapaper/presenter.rb', line 6 def initialize(activity) @activity = activity end |
Instance Method Details
#details ⇒ Object
14 15 16 |
# File 'lib/stratify-instapaper/presenter.rb', line 14 def details join_fields_with_separator domain, description end |
#domain ⇒ Object
18 19 20 |
# File 'lib/stratify-instapaper/presenter.rb', line 18 def domain URI.parse(URI.escape(url)).host end |
#summary ⇒ Object
10 11 12 |
# File 'lib/stratify-instapaper/presenter.rb', line 10 def summary title.blank? ? url : title end |