Class: StyleScanner::Scanner
- Inherits:
-
Object
- Object
- StyleScanner::Scanner
- Defined in:
- lib/style_scanner/scanner.rb
Instance Attribute Summary collapse
-
#finished_text ⇒ Object
Returns the value of attribute finished_text.
-
#input_text ⇒ Object
readonly
Returns the value of attribute input_text.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#sentences ⇒ Object
readonly
Returns the value of attribute sentences.
Instance Method Summary collapse
-
#initialize(input, options = {}) ⇒ Scanner
constructor
A new instance of Scanner.
- #scan ⇒ Object
Constructor Details
#initialize(input, options = {}) ⇒ Scanner
Returns a new instance of Scanner.
7 8 9 10 11 12 |
# File 'lib/style_scanner/scanner.rb', line 7 def initialize(input, ={}) # remove html @options = @input_text = convert_to_txt(input) @sentences = split_into_sentences end |
Instance Attribute Details
#finished_text ⇒ Object
Returns the value of attribute finished_text.
5 6 7 |
# File 'lib/style_scanner/scanner.rb', line 5 def finished_text @finished_text end |
#input_text ⇒ Object (readonly)
Returns the value of attribute input_text.
4 5 6 |
# File 'lib/style_scanner/scanner.rb', line 4 def input_text @input_text end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/style_scanner/scanner.rb', line 4 def @options end |
#sentences ⇒ Object (readonly)
Returns the value of attribute sentences.
4 5 6 |
# File 'lib/style_scanner/scanner.rb', line 4 def sentences @sentences end |
Instance Method Details
#scan ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/style_scanner/scanner.rb', line 14 def scan sentences.each do |sentence| desired_scans.each do |scanner_type| scanner_type.scan(sentence) end puts sentence.user_friendly_readout end end |