Class: Bashly::Script::Wrapper
- Inherits:
-
Object
- Object
- Bashly::Script::Wrapper
- Includes:
- Renderable
- Defined in:
- lib/bashly/script/wrapper.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#function_name ⇒ Object
readonly
Returns the value of attribute function_name.
Attributes included from Renderable
Instance Method Summary collapse
- #code(tab_indent: false) ⇒ Object
-
#initialize(command, function_name = nil) ⇒ Wrapper
constructor
A new instance of Wrapper.
Methods included from Renderable
#load_user_file, #render, #strings, #user_file_exist?, #user_file_path, #view_marker
Constructor Details
#initialize(command, function_name = nil) ⇒ Wrapper
Returns a new instance of Wrapper.
8 9 10 11 |
# File 'lib/bashly/script/wrapper.rb', line 8 def initialize(command, function_name = nil) @command = command @function_name = function_name end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
6 7 8 |
# File 'lib/bashly/script/wrapper.rb', line 6 def command @command end |
#function_name ⇒ Object (readonly)
Returns the value of attribute function_name.
6 7 8 |
# File 'lib/bashly/script/wrapper.rb', line 6 def function_name @function_name end |
Instance Method Details
#code(tab_indent: false) ⇒ Object
13 14 15 |
# File 'lib/bashly/script/wrapper.rb', line 13 def code(tab_indent: false) tab_indent ? base_code. : base_code end |