Method: Fitting::Doc::Code#initialize
- Defined in:
- lib/fitting/doc/code.rb
#initialize(code, value) ⇒ Code
Returns a new instance of Code.
9 10 11 12 13 14 15 16 17 |
# File 'lib/fitting/doc/code.rb', line 9 def initialize(code, value) @step_cover_size = 0 @step_key = code @next_steps = [] value.group_by { |val| val['content-type'] }.each do |content_type, subvalue| break if content_type == nil @next_steps.push(ContentType.new(content_type, subvalue)) end end |