Class: Teapot::Definition
- Inherits:
-
Object
- Object
- Teapot::Definition
- Defined in:
- lib/teapot/definition.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
The context in which the definition was loaded:.
-
#description ⇒ Object
A textual description of the definition, possibly in markdown format:.
-
#name ⇒ Object
readonly
The name of the definition:.
-
#package ⇒ Object
readonly
The package in which the definition was specified:.
Instance Method Summary collapse
-
#initialize(context, package, name) ⇒ Definition
constructor
A new instance of Definition.
-
#path ⇒ Object
The path that the definition is relative to:.
- #to_s ⇒ Object
Constructor Details
#initialize(context, package, name) ⇒ Definition
Returns a new instance of Definition.
23 24 25 26 27 28 29 30 |
# File 'lib/teapot/definition.rb', line 23 def initialize(context, package, name) @context = context @package = package @name = name @description = nil end |
Instance Attribute Details
#context ⇒ Object (readonly)
The context in which the definition was loaded:
33 34 35 |
# File 'lib/teapot/definition.rb', line 33 def context @context end |
#description ⇒ Object
A textual description of the definition, possibly in markdown format:
42 43 44 |
# File 'lib/teapot/definition.rb', line 42 def description @description end |
#name ⇒ Object (readonly)
The name of the definition:
39 40 41 |
# File 'lib/teapot/definition.rb', line 39 def name @name end |
#package ⇒ Object (readonly)
The package in which the definition was specified:
36 37 38 |
# File 'lib/teapot/definition.rb', line 36 def package @package end |
Instance Method Details
#path ⇒ Object
The path that the definition is relative to:
53 54 55 |
# File 'lib/teapot/definition.rb', line 53 def path @package.path end |
#to_s ⇒ Object
57 58 59 |
# File 'lib/teapot/definition.rb', line 57 def to_s "<#{self.class.name} #{@name.dump}>" end |