Class: Condition::Reader::ConvertSheet
- Inherits:
-
Object
- Object
- Condition::Reader::ConvertSheet
- Defined in:
- lib/condition/reader/convert_sheet.rb
Instance Method Summary collapse
- #convert(path, sheet_index, name) ⇒ Object
-
#initialize(redis) ⇒ ConvertSheet
constructor
A new instance of ConvertSheet.
Constructor Details
#initialize(redis) ⇒ ConvertSheet
Returns a new instance of ConvertSheet.
7 8 9 10 |
# File 'lib/condition/reader/convert_sheet.rb', line 7 def initialize(redis) @redis = redis @reader = Condition::Reader::RooReader.new end |
Instance Method Details
#convert(path, sheet_index, name) ⇒ Object
12 13 14 |
# File 'lib/condition/reader/convert_sheet.rb', line 12 def convert(path, sheet_index, name) @redis.set(name, JSON.generate(@reader.read_sheet(path, sheet_index))) end |