Class: Precheck::ItemToCheck
- Inherits:
-
Object
- Object
- Precheck::ItemToCheck
- Defined in:
- precheck/lib/precheck/item_to_check.rb
Overview
each attribute on a app version is a single item. for example: .name, .keywords, .description, will all have a single item to represent them which includes their name and a more user-friendly name we can use to print out information
Direct Known Subclasses
Instance Attribute Summary collapse
-
#friendly_name ⇒ Object
Returns the value of attribute friendly_name.
-
#is_optional ⇒ Object
Returns the value of attribute is_optional.
-
#item_name ⇒ Object
Returns the value of attribute item_name.
Instance Method Summary collapse
-
#initialize(item_name, friendly_name, is_optional = false) ⇒ ItemToCheck
constructor
A new instance of ItemToCheck.
- #inspect ⇒ Object
- #item_data ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(item_name, friendly_name, is_optional = false) ⇒ ItemToCheck
Returns a new instance of ItemToCheck.
10 11 12 13 14 |
# File 'precheck/lib/precheck/item_to_check.rb', line 10 def initialize(item_name, friendly_name, is_optional = false) @item_name = item_name @friendly_name = friendly_name @is_optional = is_optional end |
Instance Attribute Details
#friendly_name ⇒ Object
Returns the value of attribute friendly_name.
7 8 9 |
# File 'precheck/lib/precheck/item_to_check.rb', line 7 def friendly_name @friendly_name end |
#is_optional ⇒ Object
Returns the value of attribute is_optional.
8 9 10 |
# File 'precheck/lib/precheck/item_to_check.rb', line 8 def is_optional @is_optional end |
#item_name ⇒ Object
Returns the value of attribute item_name.
6 7 8 |
# File 'precheck/lib/precheck/item_to_check.rb', line 6 def item_name @item_name end |
Instance Method Details
#inspect ⇒ Object
20 21 22 |
# File 'precheck/lib/precheck/item_to_check.rb', line 20 def inspect "#{self.class}(friendly_name: #{@friendly_name}, data: #{@item_data})" end |
#item_data ⇒ Object
16 17 18 |
# File 'precheck/lib/precheck/item_to_check.rb', line 16 def item_data not_implemented(__method__) end |
#to_s ⇒ Object
24 25 26 |
# File 'precheck/lib/precheck/item_to_check.rb', line 24 def to_s "#{self.class}: #{item_name}: #{friendly_name}" end |