Class: RDFa

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

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(sym, *args, &block) ⇒ Object

This method is called if doesnt exist the method called by class’s users



35
36
37
# File 'lib/data_models/RDFa.rb', line 35

def method_missing(sym, *args, &block)
  _html_code(sym.to_s,args[0],args[1],args[2],args[3])
end

Instance Method Details

#a(model, href, value, attribute = nil, options = nil) ⇒ Object

———————————————–Links



10
11
12
# File 'lib/data_models/RDFa.rb', line 10

def a(model,href,value,attribute=nil,options=nil)
   _html_code('a',model,value,attribute,"href='#{href||'#'}' "+options.to_s)
end

#img(model, value, attribute = nil, options = nil) ⇒ Object

———————————————–End List_to_user ————————————————AUTO-CLOSED



25
26
27
# File 'lib/data_models/RDFa.rb', line 25

def img(model,value,attribute=nil,options=nil)
   _html_code('img',model,nil,attribute,"src='#{value||'#'}' "+options.to_s)
end

#input(model, type, attribute = nil, options = nil) ⇒ Object



29
30
31
# File 'lib/data_models/RDFa.rb', line 29

def input(model,type,attribute=nil,options=nil)
   nil
end

#ol(model, value, attribute = nil, options = nil) ⇒ Object



20
21
22
# File 'lib/data_models/RDFa.rb', line 20

def ol(model,value,attribute=nil,options=nil)
   _html_code_list('ol',model,value,options)
end

#ul(model, value, attribute = nil, options = nil) ⇒ Object

———————————————–End Links ———————————————–List_to_user



16
17
18
# File 'lib/data_models/RDFa.rb', line 16

def ul(model,value,attribute=nil,options=nil)
   _html_code_list('ul',model,value,options)
end