Class: Kitchen::Directions::BakeChapterReferences::V3::Reference

Inherits:
Object
  • Object
show all
Defined in:
lib/kitchen/directions/bake_chapter_references/v3.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(element) ⇒ Reference

Returns a new instance of Reference.



8
9
10
11
12
# File 'lib/kitchen/directions/bake_chapter_references/v3.rb', line 8

def initialize(element)
  reference_item = Kitchen::I18nString.new(element.text.downcase)
  @sortable = [reference_item]
  @element = element
end

Instance Attribute Details

#elementObject (readonly)

Returns the value of attribute element.



6
7
8
# File 'lib/kitchen/directions/bake_chapter_references/v3.rb', line 6

def element
  @element
end

Instance Method Details

#<=>(other) ⇒ Object



14
15
16
# File 'lib/kitchen/directions/bake_chapter_references/v3.rb', line 14

def <=>(other)
  sortable <=> other.sortable
end