Class: Connect::Entry::Value
- Includes:
 - Conversions
 
- Defined in:
 - lib/connect/entries/value.rb
 
Overview
Represent an actual value in the values_table
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #inspect ⇒ Object
 - 
  
    
      #to_ext  ⇒ Hash 
    
    
  
  
  
  
  
  
  
  
  
    
Translate the object for external representation.
 
Methods included from Conversions
#convert_array, #convert_array_entry, #convert_hash, #convert_hash_entry
Methods inherited from Base
#add_reference, #final, #initialize, #merge!
Constructor Details
This class inherits a constructor from Connect::Entry::Base
Instance Method Details
#inspect ⇒ Object
      14 15 16  | 
    
      # File 'lib/connect/entries/value.rb', line 14 def inspect to_ext end  | 
  
#to_ext ⇒ Hash
Translate the object for external representation
rubocop:disable CaseIndentation, EndAlignment, IndentationWidth
      26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44  | 
    
      # File 'lib/connect/entries/value.rb', line 26 def to_ext value = case @value when Array # # Because we've defined some convenience methods for Array's, we # force the return value to be of type ExtendedArray # convert_array(@value) when Hash # # Because we've defined some convenience methods for Hashes, we force # the type to be a MathodHash # convert_hash(@value) else @value.respond_to?(:final) ? @value.final : @value end Selector.run(value, selector) end  |