Class: DiceBag::Transform

Inherits:
Parslet::Transform
  • Object
show all
Defined in:
lib/dicebag/transform.rb

Overview

This is the Transform subclass that takes the parsed tree and transforms it into its (almost) final form. (It gets a normalization pass later.)

Class Method Summary collapse

Class Method Details

.hashify_options(options) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/dicebag/transform.rb', line 9

def self.hashify_options(options)
  opts = {}

  options.each { |opt, val| opts[opt] = val } if options.is_a?(Array)

  opts
end