Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/smml/msm.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#lastIsPreAfter ⇒ Object
516 517 518 |
# File 'lib/smml/msm.rb', line 516 def lastIsPreAfter self[-1][0..1]==[:call,:preAfter] end |
#orotate(n = 1) ⇒ Object
507 508 509 510 511 512 513 514 515 |
# File 'lib/smml/msm.rb', line 507 def orotate n=1 r=self if n>0 n.times{r=r.rotatePlus} else (-n).times{r=r.rotateMinus} end r end |
#rotateMinus ⇒ Object
504 505 506 |
# File 'lib/smml/msm.rb', line 504 def rotateMinus [self.last-12]+self[0..-2] end |
#rotatePlus ⇒ Object
501 502 503 |
# File 'lib/smml/msm.rb', line 501 def rotatePlus self[1..-1]+[self.first+12] end |