Class: TTYString::Row

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/tty_string/row.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(newline_style: NullStyle) ⇒ Row

Returns a new instance of Row.



9
10
11
12
# File 'lib/tty_string/row.rb', line 9

def initialize(newline_style: NullStyle)
  @array = []
  self.newline_style = newline_style
end

Instance Attribute Details

#newline_styleObject

Returns the value of attribute newline_style.



7
8
9
# File 'lib/tty_string/row.rb', line 7

def newline_style
  @newline_style
end

Instance Method Details

#[]=(index, value) ⇒ Object



18
19
20
# File 'lib/tty_string/row.rb', line 18

def []=(index, value)
  @array[index] = value
end

#each(&block) ⇒ Object



14
15
16
# File 'lib/tty_string/row.rb', line 14

def each(&block)
  @array.each(&block)
end

#fill(*args) ⇒ Object



26
27
28
# File 'lib/tty_string/row.rb', line 26

def fill(*args)
  @array.fill(*args)
end

#slice!(*args) ⇒ Object



22
23
24
# File 'lib/tty_string/row.rb', line 22

def slice!(*args)
  @array.slice!(*args)
end