Class: Weaver::DynamicTableCell

Inherits:
Elements
  • Object
show all
Defined in:
lib/weaver/element_types/dynamic_table_cell.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Elements

#_button, #accordion, #background, #badge, #big_button, #big_embossed_button, #block_button, #breadcrumb, #center, #circle_button, #col, #crossfade_image, #embossed_button, #gallery, #generate, #half, #hyperlink, #ibox, #icon, #image, #initialize, #jumbotron, #math, #method_missing, #modal, #normal_button, #on_page_load, #outline_button, #p, #panel, #quarter, #request_css, #request_js, #root, #rounded_button, #row, #small_button, #syntax, #table, #table_from_hashes, #table_from_source, #tabs, #text, #third, #tiny_button, #twothirds, #wform, #widget, #write_script_once

Constructor Details

This class inherits a constructor from Weaver::Elements

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Weaver::Elements

Instance Attribute Details

#transform_scriptObject

Returns the value of attribute transform_script.



5
6
7
# File 'lib/weaver/element_types/dynamic_table_cell.rb', line 5

def transform_script
  @transform_script
end

Instance Method Details

#data_button(anIcon, title = {}, options = {}, &block) ⇒ Object



7
8
9
10
11
12
# File 'lib/weaver/element_types/dynamic_table_cell.rb', line 7

def data_button(anIcon, title = {}, options = {}, &block)
  options[:icon] = anIcon
  options[:title] = title
  options[:data] = "$(this).closest('td').data('object')"
  _button(options, &block)
end

#transform(script) ⇒ Object



14
15
16
# File 'lib/weaver/element_types/dynamic_table_cell.rb', line 14

def transform(script)
  @transform_script = script
end