Skip to content

Commit 18807e5

Browse files
committed
Docstrings.
1 parent 3d1b939 commit 18807e5

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

lib/poise_application_python/app_mixin.rb

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,38 +14,52 @@
1414
# limitations under the License.
1515
#
1616

17-
require 'chef/mash'
1817
require 'poise/backports'
1918
require 'poise/utils'
2019
require 'poise_application/app_mixin'
2120
require 'poise_python/python_command_mixin'
2221

2322

2423
module PoiseApplicationPython
24+
# A helper mixin for Python application resources and providers.
25+
#
26+
# @since 4.0.0
2527
module AppMixin
2628
include Poise::Utils::ResourceProviderMixin
2729

30+
# A helper mixin for Python application resources.
2831
module Resource
2932
include PoiseApplication::AppMixin::Resource
3033
include PoisePython::PythonCommandMixin::Resource
3134

35+
# @!attribute parent_python
36+
# Override the #parent_python from PythonCommandMixin to grok the
37+
# application level parent as a default value.
38+
# @return [PoisePython::Resources::PythonRuntime::Resource, nil]
3239
parent_attribute(:python, type: :python_runtime, optional: true, default: lazy { app_state_python.equal?(self) ? nil : app_state_python })
3340

3441
# @attribute app_state_python
42+
# The application-level Python parent.
43+
# @return [PoisePython::Resources::PythonRuntime::Resource, nil]
3544
def app_state_python(python=Poise::NOT_PASSED)
3645
unless python == Poise::NOT_PASSED
3746
app_state[:python] = python
3847
end
3948
app_state[:python]
4049
end
4150

51+
# A merged hash of environment variables for both the application state
52+
# and parent python.
53+
#
54+
# @return [Hash<String, String>]
4255
def app_state_environment_python
4356
env = app_state_environment
4457
env = env.merge(parent_python.python_environment) if parent_python
4558
env
4659
end
4760
end
4861

62+
# A helper mixin for Python application providers.
4963
module Provider
5064
include PoiseApplication::AppMixin::Provider
5165
end

0 commit comments

Comments
 (0)