Class: GdocsBootstrap
- Inherits:
-
Object
- Object
- GdocsBootstrap
- Defined in:
- lib/gdocs_bootstrap.rb
Instance Attribute Summary collapse
-
#dictionary ⇒ Object
Returns the value of attribute dictionary.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#key_name ⇒ Object
Returns the value of attribute key_name.
-
#key_sprintf ⇒ Object
set in options.
-
#target_class_name ⇒ Object
set in options.
-
#url ⇒ Object
set in options.
-
#width ⇒ Object
Returns the value of attribute width.
Instance Method Summary collapse
Instance Attribute Details
#dictionary ⇒ Object
Returns the value of attribute dictionary.
8 9 10 |
# File 'lib/gdocs_bootstrap.rb', line 8 def dictionary @dictionary end |
#headers ⇒ Object
Returns the value of attribute headers.
8 9 10 |
# File 'lib/gdocs_bootstrap.rb', line 8 def headers @headers end |
#key_name ⇒ Object
Returns the value of attribute key_name.
8 9 10 |
# File 'lib/gdocs_bootstrap.rb', line 8 def key_name @key_name end |
#key_sprintf ⇒ Object
set in options
7 8 9 |
# File 'lib/gdocs_bootstrap.rb', line 7 def key_sprintf @key_sprintf end |
#target_class_name ⇒ Object
set in options
7 8 9 |
# File 'lib/gdocs_bootstrap.rb', line 7 def target_class_name @target_class_name end |
#url ⇒ Object
set in options
7 8 9 |
# File 'lib/gdocs_bootstrap.rb', line 7 def url @url end |
#width ⇒ Object
Returns the value of attribute width.
8 9 10 |
# File 'lib/gdocs_bootstrap.rb', line 8 def width @width end |
Instance Method Details
#bootstrap! ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/gdocs_bootstrap.rb', line 10 def bootstrap! load_dictionary unless dictionary_loaded? dictionary.each do |k, v| instance_of_target_class = target_class.send("find_or_create_by_#{key_name}", v[key_name]) instance_of_target_class.update_attributes(v.except(key_name)) end true end |