Sha256: b1e5fea7e9215f0cb276b4a5743b8c6db324b727d76418704cbfb4476396935b

Contents?: true

Size: 434 Bytes

Versions: 3

Compression:

Stored size: 434 Bytes

Contents

module Crystal
  class Params < OpenObject
    # include OpenConstructor
    
    def initialize h = nil      
      if h and (format = h.delete('format') || h.delete(:format))
        h = h.clone
        h[:format] = Format.new(format.to_s) 
      end
      update h if h
    end
    
    def format= value
      self[:format] = Format.new value
    end
    
    def inspect      
      h = to_h
      h.inspect
    end    
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
crystal-0.0.13 lib/crystal/conveyor/params.rb
crystal-0.0.12 lib/crystal/conveyor/params.rb
crystal_ext-0.0.11 lib/crystal/conveyor/params.rb