Class: TNS::Color::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/tns/color/base.rb

Overview

Base color class

Direct Known Subclasses

Hex, RGB, Variant

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Object



15
16
17
# File 'lib/tns/color/base.rb', line 15

def ==(other)
  other.class == self.class && other.state == state
end

#stateObject



19
20
21
# File 'lib/tns/color/base.rb', line 19

def state
  instance_variables.map { |variable| instance_variable_get variable }
end

#to_cssObject

Raises:

  • (NotImplementedError)


7
8
9
# File 'lib/tns/color/base.rb', line 7

def to_css
  raise NotImplementedError
end

#to_sObject

Raises:

  • (NotImplementedError)


11
12
13
# File 'lib/tns/color/base.rb', line 11

def to_s
  raise NotImplementedError
end