Class: FormFactor::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/form_factor/form_factor.rb

Direct Known Subclasses

ScaffoldTemplate

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Base

Returns a new instance of Base.



42
43
44
45
# File 'lib/form_factor/form_factor.rb', line 42

def initialize(options)
  @options = options.clone
  @options[:index] = 0
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



41
42
43
# File 'lib/form_factor/form_factor.rb', line 41

def options
  @options
end

Instance Method Details

#javascriptsObject



50
51
# File 'lib/form_factor/form_factor.rb', line 50

def javascripts
end

#render(*parts) ⇒ Object



53
54
55
56
57
# File 'lib/form_factor/form_factor.rb', line 53

def render *parts
  result = do_render *parts
  @options[:index] += 1
  result
end

#stylesheetsObject



47
48
# File 'lib/form_factor/form_factor.rb', line 47

def stylesheets
end