Class: Precheck::TextItemToCheck
- Inherits:
-
ItemToCheck
- Object
- ItemToCheck
- Precheck::TextItemToCheck
- Defined in:
- precheck/lib/precheck/item_to_check.rb
Overview
if the data point we want to check is a text field (like ‘description’), we’ll use this object to encapsulate it this includes the text, the property name, and what that name maps to in plain english so that we can print out nice, friendly messages.
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns the value of attribute text.
Attributes inherited from ItemToCheck
#friendly_name, #is_optional, #item_name
Instance Method Summary collapse
-
#initialize(text, item_name, friendly_name, is_optional = false) ⇒ TextItemToCheck
constructor
A new instance of TextItemToCheck.
- #item_data ⇒ Object
Methods inherited from ItemToCheck
Constructor Details
#initialize(text, item_name, friendly_name, is_optional = false) ⇒ TextItemToCheck
Returns a new instance of TextItemToCheck.
34 35 36 37 |
# File 'precheck/lib/precheck/item_to_check.rb', line 34 def initialize(text, item_name, friendly_name, is_optional = false) @text = text super(item_name, friendly_name, is_optional) end |
Instance Attribute Details
#text ⇒ Object
Returns the value of attribute text.
32 33 34 |
# File 'precheck/lib/precheck/item_to_check.rb', line 32 def text @text end |
Instance Method Details
#item_data ⇒ Object
39 40 41 |
# File 'precheck/lib/precheck/item_to_check.rb', line 39 def item_data return text end |