Class: Rad::Conveyors::Workspace

Inherits:
OpenObject
  • Object
show all
Defined in:
lib/rad/conveyors/_workspace.rb

Instance Method Summary collapse

Instance Method Details

#[]=(k, v) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/rad/conveyors/_workspace.rb', line 11

def []= k, v
  if k.to_s == 'params'
    self.params = v
  else
    set_without_params k, v
  end
end

#inspectObject



27
28
29
30
31
32
33
# File 'lib/rad/conveyors/_workspace.rb', line 27

def inspect
  h = {}
  each{|k, v| h[k] = v}
  h['env'] = "..." if h.include? 'env'
  h['request'] = "..." if h.include? 'request'
  h.inspect
end

#paramsObject



2
3
4
# File 'lib/rad/conveyors/_workspace.rb', line 2

def params
  self[:params] || ::Rad::Conveyors::Params.new
end

#params=(v) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/rad/conveyors/_workspace.rb', line 19

def params= v
  if v.is_a? ::Rad::Conveyors::Params
    set_without_params :params, v
  else
    set_without_params :params, ::Rad::Conveyors::Params.new(v)
  end
end

#params?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/rad/conveyors/_workspace.rb', line 6

def params?
  !!params
end

#set_without_paramsObject



10
# File 'lib/rad/conveyors/_workspace.rb', line 10

alias_method :set_without_params, :[]=