for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
# frozen_string_literal: true
# Main view class
# Used for Bootstrap components management
# Documentation for v.4 https://getbootstrap.com/docs/4.0/examples
class Vista < Hash
# TODO: Non default carousel and breadcrumb should be accesor
attr_accessor :ruta, :title, :subtitle, :template
def initialize(args)
args.each do |k, v|
instance_variable_set("@#{k}", v) unless v.nil?
end
def breadcrumb?
ruta != 'inicio' # default
# TODO: Missing non-default behaviour
def carousel?
ruta == 'inicio'
# TODO: Renegados
def breadcrumb
if breadcrumb?
[] # TODO: This should return an array
else
false