class Pione::Lang::BasicModel

BasicModel is a class for pione model object.

Public Class Methods

atomic?() click to toggle source

Return true if the object is atomic.

@return [Boolean]

true if the object is atom, or false.
# File lib/pione/lang/basic-model.rb, line 10
def atomic?
  @atomic ||= true
end
new(&b) click to toggle source

Creates a model object.

# File lib/pione/lang/basic-model.rb, line 22
def initialize(&b)
  instance_eval(&b) if block_given?
end
set_atomic(b) click to toggle source
# File lib/pione/lang/basic-model.rb, line 14
def set_atomic(b)
  @atomic = b
end

Public Instance Methods

eval(env) click to toggle source

Evaluates the model object in the variable table.

# File lib/pione/lang/basic-model.rb, line 27
def eval(env)
  return self
end
include_variable?() click to toggle source

Returns true if the object has pione variables. @return [Boolean]

true if the object has pione variables, or false
# File lib/pione/lang/basic-model.rb, line 34
def include_variable?
  false
end
set_document_path(path) click to toggle source

Returns rule definition document path. @return [void]

# File lib/pione/lang/basic-model.rb, line 40
def set_document_path(path)
  @__document_path__ = path
end