class Tulipmania::Service
Constants
- PUBLIC_FOLDER
- VIEWS_FOLDER
Public Class Methods
Private Instance Methods
fmt_tulips( hash )
click to toggle source
helpers
# File lib/tulipmania/service.rb, line 114 def fmt_tulips( hash ) lines = [] hash.each do |what,qty| lines << "#{what} × #{qty}" end lines.join( ', ' ) end
node()
click to toggle source
return network node (built and configured on first use)
fix: do NOT use @@ - use a class level method or something
# File lib/tulipmania/service.rb, line 94 def node if defined?( @@node ) @@node else puts "[debug] tulipmania - build (network) node (address: #{Tulipmania.config.address})" @@node = Node.new( address: Tulipmania.config.address ) @@node end #### ## check why this is a syntax error: ## @node ||= do ## puts "[debug] tulipmania - build (network) node (address: #{Tulipmania.config.address})" ## @node = Node.new( address: Tulipmania.config.address ) ## end end