Class: TrueURL
- Inherits:
-
Object
- Object
- TrueURL
- Defined in:
- lib/true_url.rb,
lib/true_url/fetch.rb,
lib/true_url/context.rb,
lib/true_url/version.rb,
lib/true_url/strategy.rb,
lib/true_url/strategy/vimeo.rb,
lib/true_url/strategy/twitter.rb,
lib/true_url/strategy/youtube.rb,
lib/true_url/strategy/nicovideo.rb,
lib/true_url/strategy/dailymotion.rb
Defined Under Namespace
Modules: Fetch, Strategy Classes: Context
Constant Summary collapse
- OPTIONS =
{ scheme_override: nil, # Possible choices: "https", "http", nil (preserve scheme) fetch: true # Whether to fetch the URL }.freeze
- QUERY_VALUES_TO_REMOVE =
%w[ utm_source utm_medium utm_term utm_content utm_campaign sms_ss awesm xtor PHPSESSID ].freeze
- VERSION =
'0.0.5'.freeze
Instance Attribute Summary collapse
-
#context ⇒ Object
Returns the value of attribute context.
-
#strategies ⇒ Object
Returns the value of attribute strategies.
Instance Method Summary collapse
- #attributes ⇒ Object
- #canonical ⇒ Object
-
#initialize(url, options = {}) ⇒ TrueURL
constructor
A new instance of TrueURL.
Constructor Details
Instance Attribute Details
#context ⇒ Object
Returns the value of attribute context.
7 8 9 |
# File 'lib/true_url.rb', line 7 def context @context end |
#strategies ⇒ Object
Returns the value of attribute strategies.
7 8 9 |
# File 'lib/true_url.rb', line 7 def strategies @strategies end |
Instance Method Details
#attributes ⇒ Object
37 38 39 40 |
# File 'lib/true_url.rb', line 37 def attributes execute @context.attributes end |
#canonical ⇒ Object
32 33 34 35 |
# File 'lib/true_url.rb', line 32 def canonical execute @context.working_url.to_s end |