module HardwareInformation::EmbeddableInterface
Public Class Methods
routes?()
click to toggle source
#¶ ↑
HardwareInformation::EmbeddableInterface.routes?
¶ ↑
Define all legal routes via this Array. This Array will then be used to add more routes to any sinatra-application that needs it.
#¶ ↑
# File lib/hardware_information/www/embeddable_interface.rb, line 20 def self.routes? [ 'hardware_information' ] end
Public Instance Methods
return_sinatra_hardware_information()
click to toggle source
#¶ ↑
return_sinatra_hardware_information
¶ ↑
#¶ ↑
# File lib/hardware_information/www/embeddable_interface.rb, line 29 def return_sinatra_hardware_information hash = HardwareInformation::PurchasedHardware.my_hardware _ = ''.dup hash.each_pair {|key, inner_hash| _ << key+'<br>' _ << '<span style="margin-left: 1em">bought at: '+ inner_hash['bought_at'].to_s+'</span><br>' _ << '<br>' } return _ end