Class: Tetsujin::Theory::Interval
- Inherits:
-
Object
- Object
- Tetsujin::Theory::Interval
- Defined in:
- lib/tetsujin/theory/interval.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #==(other) ⇒ Boolean
-
#initialize(value:) ⇒ Interval
constructor
A new instance of Interval.
Constructor Details
#initialize(value:) ⇒ Interval
Returns a new instance of Interval.
8 9 10 11 |
# File 'lib/tetsujin/theory/interval.rb', line 8 def initialize(value:) raise TypeError unless value.is_a?(Integer) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
5 6 7 |
# File 'lib/tetsujin/theory/interval.rb', line 5 def value @value end |
Instance Method Details
#==(other) ⇒ Boolean
15 16 17 |
# File 'lib/tetsujin/theory/interval.rb', line 15 def ==(other) value == other.value end |