Class: SPQR::SchemaClass::SchemaBasic

Inherits:
Object
  • Object
show all
Defined in:
lib/spqr/codegen.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#descObject

Returns the value of attribute desc.



79
80
81
# File 'lib/spqr/codegen.rb', line 79

def desc
  @desc
end

#kindObject

Returns the value of attribute kind.



79
80
81
# File 'lib/spqr/codegen.rb', line 79

def kind
  @kind
end

#nameObject

Returns the value of attribute name.



79
80
81
# File 'lib/spqr/codegen.rb', line 79

def name
  @name
end

#optionsObject

Returns the value of attribute options.



79
80
81
# File 'lib/spqr/codegen.rb', line 79

def options
  @options
end

Instance Method Details

#property?Boolean

Returns:

  • (Boolean)


88
89
90
# File 'lib/spqr/codegen.rb', line 88

def property?
  @what == :property
end

#statistic?Boolean

Returns:

  • (Boolean)


92
93
94
# File 'lib/spqr/codegen.rb', line 92

def statistic?
  @what == :statistic
end