Class: CellObject

Inherits:
Object
  • Object
show all
Includes:
DataFactory, Foundry, StringFactory, Workflows
Defined in:
lib/sambal-cle/data_objects/matrix.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Workflows

menu_link, #open_my_site_by_name, #reset

Constructor Details

#initialize(browser, opts = {}) ⇒ CellObject

Returns a new instance of CellObject.



108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'lib/sambal-cle/data_objects/matrix.rb', line 108

def initialize(browser, opts={})
  @browser = browser
  
  defaults = {
    :title=>random_alphanums,
    :instructions=>random_alphanums,
    :rationale=>random_alphanums,
    :examples=>random_alphanums
  }
  options = defaults.merge(opts)
  
  set_options(options)
  requires @matrix, @row, @column
end

Instance Attribute Details

#columnObject

Returns the value of attribute column.



106
107
108
# File 'lib/sambal-cle/data_objects/matrix.rb', line 106

def column
  @column
end

#examplesObject

Returns the value of attribute examples.



106
107
108
# File 'lib/sambal-cle/data_objects/matrix.rb', line 106

def examples
  @examples
end

#idObject

Returns the value of attribute id.



106
107
108
# File 'lib/sambal-cle/data_objects/matrix.rb', line 106

def id
  @id
end

#instructionsObject

Returns the value of attribute instructions.



106
107
108
# File 'lib/sambal-cle/data_objects/matrix.rb', line 106

def instructions
  @instructions
end

#matrixObject

Returns the value of attribute matrix.



106
107
108
# File 'lib/sambal-cle/data_objects/matrix.rb', line 106

def matrix
  @matrix
end

#rationaleObject

Returns the value of attribute rationale.



106
107
108
# File 'lib/sambal-cle/data_objects/matrix.rb', line 106

def rationale
  @rationale
end

#rowObject

Returns the value of attribute row.



106
107
108
# File 'lib/sambal-cle/data_objects/matrix.rb', line 106

def row
  @row
end

#titleObject

Returns the value of attribute title.



106
107
108
# File 'lib/sambal-cle/data_objects/matrix.rb', line 106

def title
  @title
end

Instance Method Details

#createObject



123
124
125
# File 'lib/sambal-cle/data_objects/matrix.rb', line 123

def create
  #:id=>cell.html[/(?<=hrefViewCell\(\').+(?=')/]
end

#deleteObject



136
137
138
# File 'lib/sambal-cle/data_objects/matrix.rb', line 136

def delete
  
end

#edit(opts = {}) ⇒ Object



127
128
129
130
# File 'lib/sambal-cle/data_objects/matrix.rb', line 127

def edit opts={}
  
  set_options(opts)
end

#viewObject



132
133
134
# File 'lib/sambal-cle/data_objects/matrix.rb', line 132

def view
  
end