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

Returns:

  • (Object)

    the current value of key



103
104
105
# File 'lib/rschema/schemas/fixed_hash.rb', line 103

def key
  @key
end

#optionalObject

Returns the value of attribute optional

Returns:

  • (Object)

    the current value of optional



103
104
105
# File 'lib/rschema/schemas/fixed_hash.rb', line 103

def optional
  @optional
end

#value_schemaObject

Returns the value of attribute value_schema

Returns:

  • (Object)

    the current value of value_schema



103
104
105
# File 'lib/rschema/schemas/fixed_hash.rb', line 103

def value_schema
  @value_schema
end

Instance Method Details

#with_wrapped_value_schema(wrapper) ⇒ Object



104
105
106
# File 'lib/rschema/schemas/fixed_hash.rb', line 104

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