Class: Voucher::SegmentsParser

Inherits:
Object
  • Object
show all
Defined in:
lib/voucher/segments_parser.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ SegmentsParser

Returns a new instance of SegmentsParser.



9
10
11
# File 'lib/voucher/segments_parser.rb', line 9

def initialize(json)
  @json = json
end

Class Method Details

.call(json) ⇒ Object



5
6
7
# File 'lib/voucher/segments_parser.rb', line 5

def self.call(json)
  new(json).call
end

Instance Method Details

#callObject



13
14
15
# File 'lib/voucher/segments_parser.rb', line 13

def call
  parse
end