Class: Exfuz::SheetName

Inherits:
Object
  • Object
show all
Includes:
Util
Defined in:
lib/exfuz/sheet_name.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Util

#match?, wsl?, wsl_to_windows

Constructor Details

#initialize(name) ⇒ SheetName

Returns a new instance of SheetName.



13
14
15
# File 'lib/exfuz/sheet_name.rb', line 13

def initialize(name)
  @name = @text = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



9
10
11
# File 'lib/exfuz/sheet_name.rb', line 9

def name
  @name
end

Class Method Details

.nameObject



5
6
7
# File 'lib/exfuz/sheet_name.rb', line 5

def self.name
  :sheet_name
end

Instance Method Details

#==(other) ⇒ Object



17
18
19
20
21
# File 'lib/exfuz/sheet_name.rb', line 17

def ==(other)
  return false if other.nil? || !other.instance_of?(Exfuz::SheetName)

  name == other.name
end

#hashObject



23
24
25
# File 'lib/exfuz/sheet_name.rb', line 23

def hash
  @name.hash
end

#jump_infoObject



27
28
29
# File 'lib/exfuz/sheet_name.rb', line 27

def jump_info
  { Exfuz::SheetName.name => @name }
end