class Bario::NullBar
Null version of Bar
Public Instance Methods
add_bar(_opts = {})
click to toggle source
# File lib/bario/null_bar.rb, line 40 def add_bar(_opts = {}) self.class.new end
bars()
click to toggle source
# File lib/bario/null_bar.rb, line 36 def bars [] end
created_at()
click to toggle source
# File lib/bario/null_bar.rb, line 8 def created_at Time.now.utc end
current()
click to toggle source
# File lib/bario/null_bar.rb, line 28 def current 0 end
name()
click to toggle source
# File lib/bario/null_bar.rb, line 16 def name "" end
percent()
click to toggle source
# File lib/bario/null_bar.rb, line 32 def percent 0.0 end
root()
click to toggle source
# File lib/bario/null_bar.rb, line 20 def root false end
total()
click to toggle source
# File lib/bario/null_bar.rb, line 24 def total 0 end
updated_at()
click to toggle source
# File lib/bario/null_bar.rb, line 12 def updated_at Time.now.utc end
Private Instance Methods
method_missing(method, *args, &block)
click to toggle source
Calls superclass method
# File lib/bario/null_bar.rb, line 46 def method_missing(method, *args, &block) if respond_to?(method) nil else super end end
respond_to_missing?(method_name, _include_private = false)
click to toggle source
# File lib/bario/null_bar.rb, line 54 def respond_to_missing?(method_name, _include_private = false) Bario::Bar.instance_methods.include?(method_name) end