lib/membrane/schema_parser.rb in membrane-0.0.1 vs lib/membrane/schema_parser.rb in membrane-0.0.2
- old
+ new
@@ -56,11 +56,11 @@
when Membrane::Schema::Any
"any"
when Membrane::Schema::Bool
"bool"
when Membrane::Schema::Class
- schema.klass.inspect
+ schema.klass.name
when Membrane::Schema::Dictionary
"dict(%s, %s)" % [deparse(schema.key_schema),
deparse(schema.value_schema)]
when Membrane::Schema::Enum
"enum(%s)" % [schema.elem_schemas.map { |es| deparse(es) }.join(", ")]
@@ -73,14 +73,10 @@
when Membrane::Schema::Tuple
"tuple(%s)" % [schema.elem_schemas.map { |es| deparse(es) }.join(", ")]
when Membrane::Schema::Value
schema.value.inspect
when Membrane::Schema::Base
- if schema.respond_to?(:deparse)
- schema.deparse
- else
- schema.inspect
- end
+ schema.inspect
else
emsg = "Expected instance of Membrane::Schema::Base, given instance of" \
+ " #{schema.class}"
raise ArgumentError.new(emsg)
end