Class: Pug::Action::Input
- Inherits:
-
Object
- Object
- Pug::Action::Input
- Defined in:
- lib/pug/action/input.rb
Overview
Defines input requirements for an Action
Instance Attribute Summary collapse
-
#action_name ⇒ String
The name of the Action.
-
#required ⇒ Boolean
If Action requires input.
Instance Method Summary collapse
-
#initialize(action_name, required) ⇒ Input
constructor
A new instance of Input.
-
#required? ⇒ Boolean
If Action requires input.
Constructor Details
#initialize(action_name, required) ⇒ Input
Returns a new instance of Input.
15 16 17 18 |
# File 'lib/pug/action/input.rb', line 15 def initialize(action_name, required) @action_name = action_name @required = required end |
Instance Attribute Details
#action_name ⇒ String
Returns the name of the Action.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/pug/action/input.rb', line 10 class Input attr_reader :action_name, :required # @param action_name [String] The name of the Action # @param required [Boolean] if Action requires input def initialize(action_name, required) @action_name = action_name @required = required end # @return [Boolean] if Action requires input def required? @required end end |
#required ⇒ Boolean
Returns if Action requires input.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/pug/action/input.rb', line 10 class Input attr_reader :action_name, :required # @param action_name [String] The name of the Action # @param required [Boolean] if Action requires input def initialize(action_name, required) @action_name = action_name @required = required end # @return [Boolean] if Action requires input def required? @required end end |
Instance Method Details
#required? ⇒ Boolean
Returns if Action requires input.
21 22 23 |
# File 'lib/pug/action/input.rb', line 21 def required? @required end |