Sha256: 8f4dbc2ebc59c669b0c5871887be539e2e2df90f04550922f11283a4001811ab

Contents?: true

Size: 702 Bytes

Versions: 1

Compression:

Stored size: 702 Bytes

Contents

module Rad
  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] = v}
      h['env'] = "..." if h.include? 'env'      
      h['request'] = "..." if h.include? 'request'
      h.inspect
    end
  end  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rad_core-0.0.13 lib/rad/conveyor/workspace.rb