Class: CqlsBeamer::Group
- Inherits:
-
Object
- Object
- CqlsBeamer::Group
- Defined in:
- lib/dyndoc/plugins/tex/beamer.rb
Instance Attribute Summary collapse
-
#list ⇒ Object
Returns the value of attribute list.
Instance Method Summary collapse
- #append(actor) ⇒ Object (also: #<<)
- #init ⇒ Object
-
#initialize ⇒ Group
constructor
A new instance of Group.
- #insert(actor, i = -1)) ⇒ Object
- #move_last(actor) ⇒ Object
- #output(txt) ⇒ Object
Constructor Details
#initialize ⇒ Group
Returns a new instance of Group.
169 170 171 |
# File 'lib/dyndoc/plugins/tex/beamer.rb', line 169 def initialize @list=[] end |
Instance Attribute Details
#list ⇒ Object
Returns the value of attribute list.
167 168 169 |
# File 'lib/dyndoc/plugins/tex/beamer.rb', line 167 def list @list end |
Instance Method Details
#append(actor) ⇒ Object Also known as: <<
177 178 179 |
# File 'lib/dyndoc/plugins/tex/beamer.rb', line 177 def append(actor) @list << ( (actor.is_a? Array) ? [Actor[actor[0]],actor[1]] : Actor[actor] ) end |
#init ⇒ Object
173 174 175 |
# File 'lib/dyndoc/plugins/tex/beamer.rb', line 173 def init @list=[] end |
#insert(actor, i = -1)) ⇒ Object
183 184 185 186 187 188 189 |
# File 'lib/dyndoc/plugins/tex/beamer.rb', line 183 def insert(actor,i=-1) if i<0 append(actor) else @list=@list[0...i]+Actor[actor]+@list[i..-1] end end |
#move_last(actor) ⇒ Object
191 192 193 194 |
# File 'lib/dyndoc/plugins/tex/beamer.rb', line 191 def move_last(actor) elt=@list.delete( (actor.is_a? String) ? Actor[actor] : actor) @list << elt if elt end |
#output(txt) ⇒ Object
196 197 198 199 200 201 202 203 204 |
# File 'lib/dyndoc/plugins/tex/beamer.rb', line 196 def output(txt) @list.each{|e| if e.is_a? Array e[0].output(txt,e[1]) else e.output(txt) end } end |