Class: DTRCore::Contract
- Inherits:
-
Object
- Object
- DTRCore::Contract
- Defined in:
- lib/dtr_core/contract.rb
Overview
Represents a contract in a DTR file.
Instance Attribute Summary collapse
-
#functions ⇒ Object
readonly
Returns the value of attribute functions.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(name, state, functions) ⇒ Contract
constructor
A new instance of Contract.
Constructor Details
#initialize(name, state, functions) ⇒ Contract
Returns a new instance of Contract.
8 9 10 11 12 |
# File 'lib/dtr_core/contract.rb', line 8 def initialize(name, state, functions) @name = name @state = state @functions = functions end |
Instance Attribute Details
#functions ⇒ Object (readonly)
Returns the value of attribute functions.
6 7 8 |
# File 'lib/dtr_core/contract.rb', line 6 def functions @functions end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/dtr_core/contract.rb', line 6 def name @name end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
6 7 8 |
# File 'lib/dtr_core/contract.rb', line 6 def state @state end |
Class Method Details
Instance Method Details
#==(other) ⇒ Object
20 21 22 23 24 |
# File 'lib/dtr_core/contract.rb', line 20 def ==(other) name == other.name && state == other.state && functions == other.functions end |