Class: Xi::StepSequencer

Inherits:
Object show all
Defined in:
lib/xi/step_sequencer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(string, *values) ⇒ StepSequencer

Returns a new instance of StepSequencer.



4
5
6
7
# File 'lib/xi/step_sequencer.rb', line 4

def initialize(string, *values)
  @string = string
  @values = values
end

Instance Attribute Details

#stringObject (readonly)

Returns the value of attribute string.



2
3
4
# File 'lib/xi/step_sequencer.rb', line 2

def string
  @string
end

#valuesObject (readonly)

Returns the value of attribute values.



2
3
4
# File 'lib/xi/step_sequencer.rb', line 2

def values
  @values
end

Instance Method Details

#inspectObject



13
14
15
16
# File 'lib/xi/step_sequencer.rb', line 13

def inspect
  "s(#{@string.inspect}" \
    "#{", #{@values.map(&:inspect).join(', ')}" unless @values.empty?})"
end

#p(*args, **metadata) ⇒ Object



9
10
11
# File 'lib/xi/step_sequencer.rb', line 9

def p(*args, **)
  build_pattern(**)
end