Module: Bike::Workflow::SD

Defined in:
lib/_workflow/_workflow.rb

Instance Method Summary collapse

Instance Method Details

#_get(arg) ⇒ Object



29
30
31
32
33
34
35
36
37
38
# File 'lib/_workflow/_workflow.rb', line 29

def _get(arg)
  if _hide? arg
    # hidden
  elsif arg[:action] == :create
    item_instance '_001'
    _get_by_tmpl({:action => :create, :conds => {:id => '_001'}}, my[:tmpl][:index])
  else
    super
  end
end

#_get_by_self_reference(arg) ⇒ Object



40
41
42
# File 'lib/_workflow/_workflow.rb', line 40

def _get_by_self_reference(arg)
  super unless _hide? arg
end

#_hide?(arg) ⇒ Boolean

Returns:

  • (Boolean)


44
45
46
47
# File 'lib/_workflow/_workflow.rb', line 44

def _hide?(arg)
  (arg[:p_action] && arg[:p_action] != :read) ||
  (arg[:orig_action] == :read && arg[:action] == :submit)
end