Class: CharsAt::Model
- Inherits:
-
Object
- Object
- CharsAt::Model
- Defined in:
- lib/charsat/model.rb
Instance Method Summary collapse
-
#initialize(content, indices) ⇒ Model
constructor
A new instance of Model.
- #parsed ⇒ Object
Constructor Details
#initialize(content, indices) ⇒ Model
5 6 7 8 |
# File 'lib/charsat/model.rb', line 5 def initialize(content, indices) @content = content @indices = indices end |
Instance Method Details
#parsed ⇒ Object
10 11 12 |
# File 'lib/charsat/model.rb', line 10 def parsed @indices.map { |i| @content[i.to_i - 1] } end |