Class: Stratify::Instapaper::Presenter

Inherits:
Object
  • Object
show all
Defined in:
lib/stratify-instapaper/presenter.rb

Instance Method Summary collapse

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

#detailsObject



14
15
16
# File 'lib/stratify-instapaper/presenter.rb', line 14

def details
  join_fields_with_separator domain, description
end

#domainObject



18
19
20
# File 'lib/stratify-instapaper/presenter.rb', line 18

def domain
  URI.parse(URI.escape(url)).host
end

#summaryObject



10
11
12
# File 'lib/stratify-instapaper/presenter.rb', line 10

def summary
  title.blank? ? url : title
end