Class: Shellfie::Frame
- Inherits:
-
Object
- Object
- Shellfie::Frame
- Defined in:
- lib/shellfie/parser.rb
Instance Attribute Summary collapse
-
#command_color ⇒ Object
readonly
Returns the value of attribute command_color.
-
#delay ⇒ Object
readonly
Returns the value of attribute delay.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#output_color ⇒ Object
readonly
Returns the value of attribute output_color.
-
#prompt ⇒ Object
readonly
Returns the value of attribute prompt.
-
#prompt_color ⇒ Object
readonly
Returns the value of attribute prompt_color.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(prompt: nil, type: nil, output: nil, delay: 0, prompt_color: nil, command_color: nil, output_color: nil) ⇒ Frame
constructor
A new instance of Frame.
- #to_h ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(prompt: nil, type: nil, output: nil, delay: 0, prompt_color: nil, command_color: nil, output_color: nil) ⇒ Frame
Returns a new instance of Frame.
152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/shellfie/parser.rb', line 152 def initialize(prompt: nil, type: nil, output: nil, delay: 0, prompt_color: nil, command_color: nil, output_color: nil) @prompt = prompt @type = type @output = output @delay = delay @prompt_color = prompt_color @command_color = command_color @output_color = output_color freeze end |
Instance Attribute Details
#command_color ⇒ Object (readonly)
Returns the value of attribute command_color.
150 151 152 |
# File 'lib/shellfie/parser.rb', line 150 def command_color @command_color end |
#delay ⇒ Object (readonly)
Returns the value of attribute delay.
150 151 152 |
# File 'lib/shellfie/parser.rb', line 150 def delay @delay end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
150 151 152 |
# File 'lib/shellfie/parser.rb', line 150 def output @output end |
#output_color ⇒ Object (readonly)
Returns the value of attribute output_color.
150 151 152 |
# File 'lib/shellfie/parser.rb', line 150 def output_color @output_color end |
#prompt ⇒ Object (readonly)
Returns the value of attribute prompt.
150 151 152 |
# File 'lib/shellfie/parser.rb', line 150 def prompt @prompt end |
#prompt_color ⇒ Object (readonly)
Returns the value of attribute prompt_color.
150 151 152 |
# File 'lib/shellfie/parser.rb', line 150 def prompt_color @prompt_color end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
150 151 152 |
# File 'lib/shellfie/parser.rb', line 150 def type @type end |
Instance Method Details
#to_h ⇒ Object
164 165 166 167 168 169 170 171 172 173 174 |
# File 'lib/shellfie/parser.rb', line 164 def to_h { prompt: prompt, type: type, output: output, delay: delay, prompt_color: prompt_color, command_color: command_color, output_color: output_color }.compact end |
#to_s ⇒ Object
176 177 178 |
# File 'lib/shellfie/parser.rb', line 176 def to_s [prompt, type, output, delay].compact.join("\n") end |