Class: TMBundle::Menu::Separator

Inherits:
Item
  • Object
show all
Defined in:
lib/tm_bundle/item.rb

Instance Attribute Summary

Attributes inherited from Item

#exclude, #items, #name, #order, #parent, #uuid

Instance Method Summary collapse

Methods inherited from Item

#checkout, #name?, #process_items, #root?, #to_s

Constructor Details

#initialize(uuid, order, options = {}) ⇒ Separator

Returns a new instance of Separator.



53
54
55
56
57
58
59
# File 'lib/tm_bundle/item.rb', line 53

def initialize(uuid, order, options = {})
  @exclude = false
  self.uuid = uuid
  self.name = uuid
  self.order = order
  self.parent = options[:parent]
end

Instance Method Details

#eql?Boolean

Returns:

  • (Boolean)


61
62
63
# File 'lib/tm_bundle/item.rb', line 61

def eql?
  order == order && parent == parent
end

#inspectObject



49
50
51
# File 'lib/tm_bundle/item.rb', line 49

def inspect
  "#{order}> — #{name}"
end

#separator?Boolean

Returns:

  • (Boolean)


65
# File 'lib/tm_bundle/item.rb', line 65

def separator?; true end