Class: GitPrepareBranch::Configurator::ScreenDSL
- Inherits:
-
Object
- Object
- GitPrepareBranch::Configurator::ScreenDSL
- Defined in:
- lib/git-prepare-branch/configurator.rb
Instance Attribute Summary collapse
-
#screen ⇒ Object
readonly
Returns the value of attribute screen.
Instance Method Summary collapse
- #apply(&block) ⇒ Object
- #command(*args) ⇒ Object
- #description(value) ⇒ Object
- #display(command) ⇒ Object
- #heading(message, options = {}) ⇒ Object
-
#initialize(screen) ⇒ ScreenDSL
constructor
A new instance of ScreenDSL.
- #title(value) ⇒ Object
Constructor Details
#initialize(screen) ⇒ ScreenDSL
Returns a new instance of ScreenDSL.
40 41 42 |
# File 'lib/git-prepare-branch/configurator.rb', line 40 def initialize(screen) @screen = screen end |
Instance Attribute Details
#screen ⇒ Object (readonly)
Returns the value of attribute screen.
38 39 40 |
# File 'lib/git-prepare-branch/configurator.rb', line 38 def screen @screen end |
Instance Method Details
#apply(&block) ⇒ Object
44 45 46 47 48 |
# File 'lib/git-prepare-branch/configurator.rb', line 44 def apply(&block) self.tap do |s| instance_exec(&block) end end |
#command(*args) ⇒ Object
50 51 52 |
# File 'lib/git-prepare-branch/configurator.rb', line 50 def command(*args) screen.add_command(*args) end |
#description(value) ⇒ Object
54 55 56 |
# File 'lib/git-prepare-branch/configurator.rb', line 54 def description(value) screen.description = value end |
#display(command) ⇒ Object
58 59 60 |
# File 'lib/git-prepare-branch/configurator.rb', line 58 def display(command) screen.display = command end |
#heading(message, options = {}) ⇒ Object
62 63 64 65 |
# File 'lib/git-prepare-branch/configurator.rb', line 62 def heading(, ={}) screen.heading = screen.heading_style = [:style] end |
#title(value) ⇒ Object
67 68 69 |
# File 'lib/git-prepare-branch/configurator.rb', line 67 def title(value) screen.title = value end |