Class: Statement::TypedParameterTypedValue
- Inherits:
-
TypedParameterValue
- Object
- TypedParameterValue
- Statement::TypedParameterTypedValue
- Defined in:
- lib/puppet/parser/functions/statement.rb
Overview
like tls in tcp source
Instance Method Summary collapse
- #add_argument(argument) ⇒ Object
- #build ⇒ Object
-
#initialize(type = '') ⇒ TypedParameterTypedValue
constructor
A new instance of TypedParameterTypedValue.
- #type=(type) ⇒ Object
Constructor Details
#initialize(type = '') ⇒ TypedParameterTypedValue
Returns a new instance of TypedParameterTypedValue.
102 103 104 105 |
# File 'lib/puppet/parser/functions/statement.rb', line 102 def initialize(type='') @type = type @arguments = [] end |
Instance Method Details
#add_argument(argument) ⇒ Object
111 112 113 |
# File 'lib/puppet/parser/functions/statement.rb', line 111 def add_argument(argument) @arguments << argument end |
#build ⇒ Object
115 116 117 118 119 120 121 122 123 124 |
# File 'lib/puppet/parser/functions/statement.rb', line 115 def build header = Statement.getln("#{@type}(") Statement.increase_indent built_args = @arguments.map {|item| item.build } Statement.decrease_indent tail = Statement.line(")") return header + built_args.join("") + "\n" + tail end |
#type=(type) ⇒ Object
107 108 109 |
# File 'lib/puppet/parser/functions/statement.rb', line 107 def type=(type) @type = type end |