Class: Unodos::NamedBase
- Inherits:
-
Object
- Object
- Unodos::NamedBase
- Defined in:
- lib/unodos/base.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
(also: #to_s, #inspect)
readonly
Returns the value of attribute name.
-
#proc ⇒ Object
readonly
Returns the value of attribute proc.
Instance Method Summary collapse
- #differential_level ⇒ Object
-
#initialize(name, &block) ⇒ NamedBase
constructor
A new instance of NamedBase.
Constructor Details
#initialize(name, &block) ⇒ NamedBase
Returns a new instance of NamedBase.
5 6 7 8 |
# File 'lib/unodos/base.rb', line 5 def initialize(name, &block) @name = name @proc = block end |
Instance Attribute Details
#name ⇒ Object (readonly) Also known as: to_s, inspect
Returns the value of attribute name.
3 4 5 |
# File 'lib/unodos/base.rb', line 3 def name @name end |
#proc ⇒ Object (readonly)
Returns the value of attribute proc.
3 4 5 |
# File 'lib/unodos/base.rb', line 3 def proc @proc end |
Instance Method Details
#differential_level ⇒ Object
10 11 12 |
# File 'lib/unodos/base.rb', line 10 def differential_level 0 end |