Class: SocialTokenizer::Token
- Inherits:
-
Object
- Object
- SocialTokenizer::Token
- Includes:
- ActiveModel::Model, ActiveModel::Validations
- Defined in:
- lib/social_tokenizer/token.rb
Instance Attribute Summary collapse
-
#token_type ⇒ Object
Returns the value of attribute token_type.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
Instance Attribute Details
#token_type ⇒ Object
Returns the value of attribute token_type.
5 6 7 |
# File 'lib/social_tokenizer/token.rb', line 5 def token_type @token_type end |
#value ⇒ Object
Returns the value of attribute value.
5 6 7 |
# File 'lib/social_tokenizer/token.rb', line 5 def value @value end |
Instance Method Details
#replaced_value ⇒ Object
7 8 9 |
# File 'lib/social_tokenizer/token.rb', line 7 def replaced_value value.gsub(token_type.pattern, token_type.replacement) end |