Class: WithClues::Private::CustomClueMethodAnalysis::TwoArgMethod
- Inherits:
-
Object
- Object
- WithClues::Private::CustomClueMethodAnalysis::TwoArgMethod
- Defined in:
- lib/with_clues/private/custom_clue_method_analysis.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(params) ⇒ TwoArgMethod
constructor
A new instance of TwoArgMethod.
- #valid? ⇒ Boolean
Constructor Details
#initialize(params) ⇒ TwoArgMethod
Returns a new instance of TwoArgMethod.
74 75 76 77 78 79 80 |
# File 'lib/with_clues/private/custom_clue_method_analysis.rb', line 74 def initialize(params) @errors = [] if !params[0].required? @errors << "Param 1, #{params[0].name}, is not required" end require_keyword(2,params[1]) end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
73 74 75 |
# File 'lib/with_clues/private/custom_clue_method_analysis.rb', line 73 def errors @errors end |
Instance Method Details
#valid? ⇒ Boolean
82 83 84 |
# File 'lib/with_clues/private/custom_clue_method_analysis.rb', line 82 def valid? @errors.empty? end |