Class: Syukujitsu::Entity

Inherits:
Struct
  • Object
show all
Includes:
Comparable
Defined in:
lib/syukujitsu/entity.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#date ⇒ Object

Returns the value of attribute date

Returns:

  • (Object) —

    the current value of date



4
5
6
# File 'lib/syukujitsu/entity.rb', line 4

def date
  @date
end

#name ⇒ Object

Returns the value of attribute name

Returns:

  • (Object) —

    the current value of name



4
5
6
# File 'lib/syukujitsu/entity.rb', line 4

def name
  @name
end

Instance Method Details

#<=>(other) ⇒ Object



7
8
9
# File 'lib/syukujitsu/entity.rb', line 7

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

#inspect ⇒ Object



15
16
17
# File 'lib/syukujitsu/entity.rb', line 15

def inspect
  "#<#{self.class} #{self}>"
end

#to_s ⇒ Object



11
12
13
# File 'lib/syukujitsu/entity.rb', line 11

def to_s
  "#{date} #{name}"
end