Method: ModelTokenizer::Base#has_token
- Defined in:
- lib/model_tokenizer/base.rb
#has_token(*attributes) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/model_tokenizer/base.rb', line 18 def has_token(*attributes) = { :length => @@model_tokenizer_token_length }.merge!(attributes.last.is_a?(Hash) ? attributes.pop : {}) if(![:length].is_a?(Integer) || [:length] < 8) [:length] = @@model_tokenizer_token_length end @@model_tokenizer_token_length = [:length] include InstanceMethods end |