class HaveAPI::Fs::Components::MetaOutput
Attributes
data[RW]
scope[R]
Public Class Methods
new(action_dir, scope, data = nil, *args)
click to toggle source
Calls superclass method
HaveAPI::Fs::Component::new
# File lib/haveapi/fs/components/meta_output.rb, line 8 def initialize(action_dir, scope, data = nil, *args) super(*args) @action_dir = action_dir @scope = scope @data = data end
Public Instance Methods
contents()
click to toggle source
Calls superclass method
HaveAPI::Fs::Components::Directory#contents
# File lib/haveapi/fs/components/meta_output.rb, line 16 def contents ret = super return ret unless @data ret.concat(parameters.keys.map(&:to_s)) ret end
parameters()
click to toggle source
# File lib/haveapi/fs/components/meta_output.rb, line 24 def parameters @action_dir.action.instance_variable_get('@spec')[:meta][@scope][:output][:parameters] end
title()
click to toggle source
# File lib/haveapi/fs/components/meta_output.rb, line 28 def title 'Output metadata parameters' end
Protected Instance Methods
new_child(name)
click to toggle source
Calls superclass method
HaveAPI::Fs::Components::Directory#new_child
# File lib/haveapi/fs/components/meta_output.rb, line 33 def new_child(name) if child = super child elsif !@data nil elsif parameters.has_key?(name) [ Parameter, @action_dir.action, name, :output, @data, meta: @scope, ] else nil end end