Class: SocialTokenizer::Token

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model, ActiveModel::Validations
Defined in:
lib/social_tokenizer/token.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#token_typeObject

Returns the value of attribute token_type


5
6
7
# File 'lib/social_tokenizer/token.rb', line 5

def token_type
  @token_type
end

#valueObject

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_valueObject


7
8
9
# File 'lib/social_tokenizer/token.rb', line 7

def replaced_value
  value.gsub(token_type.pattern, token_type.replacement)
end