Class: Decidim::Attributes::Hash
- Defined in:
 - lib/decidim/attributes/hash.rb
 
Overview
Custom attributes value to represent a Hash.
Instance Attribute Summary collapse
- 
  
    
      #key_type  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute key_type.
 
Attributes inherited from Array
Instance Method Summary collapse
- 
  
    
      #initialize(key_type: ::Symbol, value_type: ::Object, default: {})  ⇒ Hash 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Hash.
 - 
  
    
      #type  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
:nodoc:.
 
Methods inherited from Array
Constructor Details
#initialize(key_type: ::Symbol, value_type: ::Object, default: {}) ⇒ Hash
Returns a new instance of Hash.
      9 10 11 12 13  | 
    
      # File 'lib/decidim/attributes/hash.rb', line 9 def initialize(key_type: ::Symbol, value_type: ::Object, default: {}) @key_type = key_type @value_type = value_type @default = default end  | 
  
Instance Attribute Details
#key_type ⇒ Object (readonly)
Returns the value of attribute key_type.
      7 8 9  | 
    
      # File 'lib/decidim/attributes/hash.rb', line 7 def key_type @key_type end  | 
  
Instance Method Details
#type ⇒ Object
:nodoc:
      15 16 17  | 
    
      # File 'lib/decidim/attributes/hash.rb', line 15 def type # :nodoc: :hash end  |