Class: SeoFriendly::DataExtractor
- Inherits:
-
Object
- Object
- SeoFriendly::DataExtractor
- Defined in:
- lib/seo_friendly/data_extractor.rb
Constant Summary collapse
- EXTRACTORS =
a little bit of metaprogramming
{ title: TitleConstructor, description: DescriptionConstructor, keywords: KeyWordsConstructor }
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#keywords ⇒ Object
readonly
Returns the value of attribute keywords.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(source) ⇒ DataExtractor
constructor
A new instance of DataExtractor.
- #seo_attributes ⇒ Object
Constructor Details
#initialize(source) ⇒ DataExtractor
Returns a new instance of DataExtractor.
11 12 13 14 |
# File 'lib/seo_friendly/data_extractor.rb', line 11 def initialize(source) @source = source extract_information end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
6 7 8 |
# File 'lib/seo_friendly/data_extractor.rb', line 6 def description @description end |
#keywords ⇒ Object (readonly)
Returns the value of attribute keywords.
6 7 8 |
# File 'lib/seo_friendly/data_extractor.rb', line 6 def keywords @keywords end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
6 7 8 |
# File 'lib/seo_friendly/data_extractor.rb', line 6 def source @source end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
6 7 8 |
# File 'lib/seo_friendly/data_extractor.rb', line 6 def title @title end |
Instance Method Details
#seo_attributes ⇒ Object
16 17 18 |
# File 'lib/seo_friendly/data_extractor.rb', line 16 def seo_attributes { title: title, description: description, keywords: keywords } end |