Module: Mockingjay::Rules

Defined in:
lib/mockingjay/rules/base_rules.rb

Overview

These define basic rules for converting a deserialized value down to a generator

Class Method Summary collapse

Class Method Details

.fixnumObject



6
7
8
# File 'lib/mockingjay/rules/base_rules.rb', line 6

def fixnum
  {'Generator.fixnum' => '(1..100)'}
end

.floatObject



10
11
12
# File 'lib/mockingjay/rules/base_rules.rb', line 10

def float
  {'Generator.float' => '(1..100)'}
end

.stringObject



14
15
16
# File 'lib/mockingjay/rules/base_rules.rb', line 14

def string
  {'Generator.string' => 'Lorem.word'}
end

.unknown(type) ⇒ Object



18
19
20
# File 'lib/mockingjay/rules/base_rules.rb', line 18

def unknown(type)
  {'Generator.unknown' => '#{type}'}
end