Class: Pug::Interfaces::Action
- Inherits:
-
Object
- Object
- Pug::Interfaces::Action
- Defined in:
- lib/pug/interfaces/action.rb
Overview
Abstract interface representing an Action
Direct Known Subclasses
Instance Method Summary collapse
-
#description ⇒ String
Optional description for the action.
-
#execute(input) ⇒ String
Entry point for Action with provided input if any.
-
#name ⇒ String
The human readable name for the Action.
-
#requires_input? ⇒ Boolean
Indicates if the action requires an input.
Instance Method Details
#description ⇒ String
Optional description for the action
15 16 17 |
# File 'lib/pug/interfaces/action.rb', line 15 def description '' end |
#execute(input) ⇒ String
Note:
This can return nil if there is no output
Entry point for Action with provided input if any
30 31 32 |
# File 'lib/pug/interfaces/action.rb', line 30 def execute(input) # rubocop:disable UnusedMethodArgument raise NoMethodError end |
#name ⇒ String
The human readable name for the Action
9 10 11 |
# File 'lib/pug/interfaces/action.rb', line 9 def name raise NoMethodError end |
#requires_input? ⇒ Boolean
Note:
Defaults to false
Indicates if the action requires an input
22 23 24 |
# File 'lib/pug/interfaces/action.rb', line 22 def requires_input? false end |