Class: SPQR::SchemaClass::SchemaBasic
- Inherits:
-
Object
- Object
- SPQR::SchemaClass::SchemaBasic
- Defined in:
- lib/spqr/codegen.rb
Instance Attribute Summary collapse
-
#desc ⇒ Object
Returns the value of attribute desc.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#name ⇒ Object
Returns the value of attribute name.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(what, nm, desc, knd, opts) ⇒ SchemaBasic
constructor
A new instance of SchemaBasic.
- #property? ⇒ Boolean
- #statistic? ⇒ Boolean
Constructor Details
#initialize(what, nm, desc, knd, opts) ⇒ SchemaBasic
Returns a new instance of SchemaBasic.
80 81 82 83 84 85 86 |
# File 'lib/spqr/codegen.rb', line 80 def initialize(what,nm,desc,knd,opts) @what = what @name = nm @kind = knd @options = opts @desc = desc.gsub(/\s+/, " ") if desc end |
Instance Attribute Details
#desc ⇒ Object
Returns the value of attribute desc.
79 80 81 |
# File 'lib/spqr/codegen.rb', line 79 def desc @desc end |
#kind ⇒ Object
Returns the value of attribute kind.
79 80 81 |
# File 'lib/spqr/codegen.rb', line 79 def kind @kind end |
#name ⇒ Object
Returns the value of attribute name.
79 80 81 |
# File 'lib/spqr/codegen.rb', line 79 def name @name end |
#options ⇒ Object
Returns the value of attribute options.
79 80 81 |
# File 'lib/spqr/codegen.rb', line 79 def @options end |
Instance Method Details
#property? ⇒ Boolean
88 89 90 |
# File 'lib/spqr/codegen.rb', line 88 def property? @what == :property end |
#statistic? ⇒ Boolean
92 93 94 |
# File 'lib/spqr/codegen.rb', line 92 def statistic? @what == :statistic end |