Class: RSchema::Schemas::FixedHash::Attribute

Inherits:
Struct
  • Object
show all
Defined in:
lib/rschema/schemas/fixed_hash.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#keyObject

Returns the value of attribute key


99
100
101
# File 'lib/rschema/schemas/fixed_hash.rb', line 99

def key
  @key
end

#optionalObject

Returns the value of attribute optional


99
100
101
# File 'lib/rschema/schemas/fixed_hash.rb', line 99

def optional
  @optional
end

#value_schemaObject

Returns the value of attribute value_schema


99
100
101
# File 'lib/rschema/schemas/fixed_hash.rb', line 99

def value_schema
  @value_schema
end

Instance Method Details

#with_wrapped_value_schema(wrapper) ⇒ Object


100
101
102
# File 'lib/rschema/schemas/fixed_hash.rb', line 100

def with_wrapped_value_schema(wrapper)
  self.class.new(key, wrapper.wrap(value_schema), optional)
end