Class: Uh::Layout::History
- Inherits:
-
Object
- Object
- Uh::Layout::History
- Defined in:
- lib/uh/layout/history.rb
Constant Summary collapse
- TAGS_SIZE_MAX =
8
Instance Attribute Summary collapse
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
-
#tags_size_max ⇒ Object
readonly
Returns the value of attribute tags_size_max.
Instance Method Summary collapse
-
#initialize(tags = [], tags_size_max: TAGS_SIZE_MAX) ⇒ History
constructor
A new instance of History.
- #last_tag ⇒ Object
- #record_tag(tag) ⇒ Object
Constructor Details
#initialize(tags = [], tags_size_max: TAGS_SIZE_MAX) ⇒ History
Returns a new instance of History.
8 9 10 11 |
# File 'lib/uh/layout/history.rb', line 8 def initialize( = [], tags_size_max: TAGS_SIZE_MAX) = = end |
Instance Attribute Details
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
6 7 8 |
# File 'lib/uh/layout/history.rb', line 6 def end |
#tags_size_max ⇒ Object (readonly)
Returns the value of attribute tags_size_max.
6 7 8 |
# File 'lib/uh/layout/history.rb', line 6 def end |
Instance Method Details
#last_tag ⇒ Object
20 21 22 |
# File 'lib/uh/layout/history.rb', line 20 def last_tag .last end |
#record_tag(tag) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/uh/layout/history.rb', line 13 def record_tag(tag) << tag if .size > = .drop .size - end end |