Class: HaveAPI::Fs::Components::MetaOutput
- Inherits:
-
Directory
- Object
- HaveAPI::Fs::Component
- Directory
- HaveAPI::Fs::Components::MetaOutput
- Defined in:
- lib/haveapi/fs/components/meta_output.rb
Constant Summary
Constants included from Help
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
Attributes inherited from HaveAPI::Fs::Component
#atime, #context, #ctime, #mtime
Instance Method Summary collapse
- #contents ⇒ Object
-
#initialize(action_dir, scope, data = nil, *args) ⇒ MetaOutput
constructor
A new instance of MetaOutput.
- #parameters ⇒ Object
- #title ⇒ Object
Methods inherited from Directory
Methods included from Help
Methods inherited from HaveAPI::Fs::Component
#abspath, #bound=, #bound?, children_reader, component, #directory?, #executable?, #file?, #find, inherited, #invalid?, #invalidate, #parent, #path, #readable?, #reset, #setup, #times, #unsaved?, #use, #writable?
Constructor Details
#initialize(action_dir, scope, data = nil, *args) ⇒ MetaOutput
Returns a new instance of MetaOutput.
8 9 10 11 12 13 14 |
# 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 |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
5 6 7 |
# File 'lib/haveapi/fs/components/meta_output.rb', line 5 def data @data end |
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
6 7 8 |
# File 'lib/haveapi/fs/components/meta_output.rb', line 6 def scope @scope end |
Instance Method Details
#contents ⇒ Object
16 17 18 19 20 21 22 |
# 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 ⇒ Object
24 25 26 |
# 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 ⇒ Object
28 29 30 |
# File 'lib/haveapi/fs/components/meta_output.rb', line 28 def title 'Output metadata parameters' end |