Class: Rookout::Processor::Paths::Canopy::LookupOperation
Instance Method Summary collapse
-
#initialize(text) ⇒ LookupOperation
constructor
A new instance of LookupOperation.
- #read(namepsace, _create) ⇒ Object
Methods inherited from Operation
Constructor Details
#initialize(text) ⇒ LookupOperation
Returns a new instance of LookupOperation.
57 58 59 60 61 62 63 64 |
# File 'lib/rookout/processor/paths/canopy/markers.rb', line 57 def initialize text super() if (text.start_with?("'") && text.end_with?("'")) || (text.start_with?("\"") && text.end_with?("\"")) @key = text[1...-1] else @key = text.to_i end end |
Instance Method Details
#read(namepsace, _create) ⇒ Object
66 67 68 |
# File 'lib/rookout/processor/paths/canopy/markers.rb', line 66 def read namepsace, _create namepsace.read_key @key end |