class HaveAPI::Fs::Components::ActionInput
Attributes
action_dir[R]
Public Class Methods
new(action_dir, *args)
click to toggle source
Calls superclass method
# File lib/haveapi/fs/components/action_input.rb, line 6 def initialize(action_dir, *args) super(*args) @action_dir = action_dir end
Public Instance Methods
contents()
click to toggle source
Calls superclass method
# File lib/haveapi/fs/components/action_input.rb, line 11 def contents super + parameters.keys.map(&:to_s) end
parameters()
click to toggle source
# File lib/haveapi/fs/components/action_input.rb, line 15 def parameters @action_dir.action.input_params end
title()
click to toggle source
# File lib/haveapi/fs/components/action_input.rb, line 23 def title 'Input parameters' end
values()
click to toggle source
# File lib/haveapi/fs/components/action_input.rb, line 19 def values Hash[children.select { |n, c| c.is_a?(Parameter) && c.set? }.map { |n, c| [n, c.value] }] end
Protected Instance Methods
new_child(name)
click to toggle source
Calls superclass method
# File lib/haveapi/fs/components/action_input.rb, line 28 def new_child(name) if child = super child elsif @action_dir.action.input_params.has_key?(name) [Parameter, @action_dir.action, name, :input] else nil end end