Class: DisjunctionPattern

Inherits:
Object
  • Object
show all
Includes:
HashInitialized, Inspectable
Defined in:
lib/json_patterns.rb

Constant Summary

Constants included from Inspectable

Inspectable::INSPECTING_KEY

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from HashInitialized

#initialize

Methods included from Inspectable

#inspect

Instance Attribute Details

#alternativesObject

Returns the value of attribute alternatives.



63
64
65
# File 'lib/json_patterns.rb', line 63

def alternatives
  @alternatives
end

Instance Method Details

#to_sObject



65
66
67
# File 'lib/json_patterns.rb', line 65

def to_s
  "one_of(#{alternatives.join(', ')})"
end