Sha256: 7be509fb90ff934589f04ec91621eaff19ba6ab4f01899f5c49f0ab98565fecb
Contents?: true
Size: 664 Bytes
Versions: 57
Compression:
Stored size: 664 Bytes
Contents
module Plutonium module Builders class SidebarMenuItem attr_accessor :name, :value attr_reader :indicator def initialize(name, indicator: nil, value: nil) @name = name @indicator = indicator @value = value end def url(url) @value = url end def items(&) raise ArgumentError, "Indicator not allowed for items with children" if @indicator @value = Menu.new(&).items end def indicator=(indicator) raise ArgumentError, "Indicator not allowed for items with children" if @value.is_a?(Array) @indicator = indicator end end end end
Version data entries
57 entries across 57 versions & 1 rubygems