Sha256: ccf0d667b3985252dd430fcbd2671507c06bdaab27ebcd6bb072f12b47f72067

Contents?: true

Size: 711 Bytes

Versions: 3

Compression:

Stored size: 711 Bytes

Contents

module Crystal
  class Workspace < OpenObject
    def params
      self[:params] || Params.new
    end
    
    def params?
      !!params
    end
            
    alias_method :set_without_params, :[]=
    def []= k, v      
      if k.to_s == 'params'
        self.params = v
      else
        set_without_params k, v
      end
    end  
    
    def params= v
      if v.is_a? Params
        set_without_params :params, v
      else
        set_without_params :params, Params.new(v)
      end
    end
        
    def inspect
      h = {}
      each{|k, v| h[k.to_s] = v}
      h['env'] = "..." if h.include? 'env'      
      h['request'] = "..." if h.include? 'request'
      h.inspect
    end
  end  
end

Version data entries

3 entries across 3 versions & 2 rubygems

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