Class: Syukujitsu::Entity
- Inherits:
-
Struct
- Object
- Struct
- Syukujitsu::Entity
- Includes:
- Comparable
- Defined in:
- lib/syukujitsu/entity.rb
Instance Attribute Summary collapse
-
#date ⇒ Object
Returns the value of attribute date.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
Instance Attribute Details
#date ⇒ Object
Returns the value of attribute date
4 5 6 |
# File 'lib/syukujitsu/entity.rb', line 4 def date @date end |
#name ⇒ Object
Returns the value of attribute 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 |