Sha256: a23d3aa1aef321f72219b113e1b42c7eef651bf088b1553fffc9ad5e52c4c9d5
Contents?: true
Size: 696 Bytes
Versions: 1
Compression:
Stored size: 696 Bytes
Contents
module MultiHelper module Navigation class Item attr_reader :name, :options attr_accessor :links_to, :active attr_reader :logger def initialize(name, options = {}) self.name = name self.options = { :class => "", :id => ""}.merge(options) self.links_to = options[:links_to] if options[:links_to].present? end def name=(value) raise MultiHelper::Navigation::Exceptions::FieldRequired.new("name") if value.blank? @name = value end def options=(opts) @options = opts end def active! @active = true end def active? @active || false end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lucasefe-multi_helper-0.0.1 | lib/multi_helper/navigation/item.rb |