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.
-
#screen ⇒ Object
readonly
Returns the value of attribute screen.
-
#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, screen: 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, screen: nil) ⇒ Frame
Returns a new instance of Frame.
213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'lib/shellfie/parser.rb', line 213 def initialize(prompt: nil, type: nil, output: nil, delay: 0, prompt_color: nil, command_color: nil, output_color: nil, screen: nil) @prompt = prompt @type = type @output = output @delay = delay @prompt_color = prompt_color @command_color = command_color @output_color = output_color @screen = screen freeze end |
Instance Attribute Details
#command_color ⇒ Object (readonly)
Returns the value of attribute command_color.
211 212 213 |
# File 'lib/shellfie/parser.rb', line 211 def command_color @command_color end |
#delay ⇒ Object (readonly)
Returns the value of attribute delay.
211 212 213 |
# File 'lib/shellfie/parser.rb', line 211 def delay @delay end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
211 212 213 |
# File 'lib/shellfie/parser.rb', line 211 def output @output end |
#output_color ⇒ Object (readonly)
Returns the value of attribute output_color.
211 212 213 |
# File 'lib/shellfie/parser.rb', line 211 def output_color @output_color end |
#prompt ⇒ Object (readonly)
Returns the value of attribute prompt.
211 212 213 |
# File 'lib/shellfie/parser.rb', line 211 def prompt @prompt end |
#prompt_color ⇒ Object (readonly)
Returns the value of attribute prompt_color.
211 212 213 |
# File 'lib/shellfie/parser.rb', line 211 def prompt_color @prompt_color end |
#screen ⇒ Object (readonly)
Returns the value of attribute screen.
211 212 213 |
# File 'lib/shellfie/parser.rb', line 211 def screen @screen end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
211 212 213 |
# File 'lib/shellfie/parser.rb', line 211 def type @type end |
Instance Method Details
#to_h ⇒ Object
226 227 228 229 230 231 232 233 234 235 236 237 |
# File 'lib/shellfie/parser.rb', line 226 def to_h { prompt: prompt, type: type, output: output, delay: delay, prompt_color: prompt_color, command_color: command_color, output_color: output_color, screen: screen }.compact end |
#to_s ⇒ Object
239 240 241 |
# File 'lib/shellfie/parser.rb', line 239 def to_s [prompt, type, output, screen, delay].compact.join("\n") end |