Class: RedCappedList
- Inherits:
-
Object
- Object
- RedCappedList
- Defined in:
- lib/redness/red_capped_list.rb
Instance Attribute Summary collapse
-
#cap ⇒ Object
Returns the value of attribute cap.
-
#key ⇒ Object
Returns the value of attribute key.
Instance Method Summary collapse
- #add(value) ⇒ Object
- #get ⇒ Object
-
#initialize(key, cap) ⇒ RedCappedList
constructor
A new instance of RedCappedList.
Constructor Details
#initialize(key, cap) ⇒ RedCappedList
Returns a new instance of RedCappedList.
4 5 6 7 |
# File 'lib/redness/red_capped_list.rb', line 4 def initialize(key, cap) self.key = key self.cap = cap end |
Instance Attribute Details
#cap ⇒ Object
Returns the value of attribute cap.
2 3 4 |
# File 'lib/redness/red_capped_list.rb', line 2 def cap @cap end |
#key ⇒ Object
Returns the value of attribute key.
2 3 4 |
# File 'lib/redness/red_capped_list.rb', line 2 def key @key end |