mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
19 lines
298 B
Ruby
19 lines
298 B
Ruby
|
class Wizard
|
||
|
class Step
|
||
|
attr_reader :id
|
||
|
attr_accessor :index, :fields, :next, :previous
|
||
|
|
||
|
def initialize(id)
|
||
|
@id = id
|
||
|
@fields = []
|
||
|
end
|
||
|
|
||
|
def add_field(attrs)
|
||
|
field = Field.new(attrs)
|
||
|
field.step = self
|
||
|
@fields << field
|
||
|
field
|
||
|
end
|
||
|
end
|
||
|
end
|