Class: KwargModel
- Inherits:
-
Object
- Object
- KwargModel
- Defined in:
- lib/kdict/kwargmodel.rb
Overview
A convenient class for storing a unique Keyword-Argument Model
Instance Attribute Summary collapse
-
#prc ⇒ Proc
readonly
Returns a unique Proc if it exists, otherwise nil.
-
#struct ⇒ Object
readonly
Returns the structure of the typedef.
-
#type ⇒ typedef
readonly
Returns the typdef of the Model.
Instance Method Summary collapse
-
#initialize(type, struct, prc = nil) ⇒ KwargModel
constructor
A new instance of KwargModel.
-
#splay ⇒ [type, struct, prc], [type, struct]
Returns the attributes of the instance as an array.
Constructor Details
#initialize(type, struct, prc = nil) ⇒ KwargModel
Returns a new instance of KwargModel.
21 22 23 24 25 |
# File 'lib/kdict/kwargmodel.rb', line 21 def initialize(type, struct, prc=nil) @type = type @struct = struct @prc = prc if prc end |
Instance Attribute Details
#prc ⇒ Proc (readonly)
Returns a unique Proc if it exists, otherwise nil.
14 15 16 |
# File 'lib/kdict/kwargmodel.rb', line 14 def prc @prc end |
#struct ⇒ Object (readonly)
Returns the structure of the typedef.
11 12 13 |
# File 'lib/kdict/kwargmodel.rb', line 11 def struct @struct end |
#type ⇒ typedef (readonly)
Returns the typdef of the Model.
7 8 9 |
# File 'lib/kdict/kwargmodel.rb', line 7 def type @type end |