class Zapata::Primitive::Def
Attributes
klass[RW]
Public Class Methods
new(code)
click to toggle source
# File lib/zapata/primitive/def.rb, line 8 def initialize(code) @code = code @klass = Diver.current_klass @self = Diver.current_sklass @access_level = Diver.access_level dive_deeper end
Public Instance Methods
literal_predicted_args()
click to toggle source
# File lib/zapata/primitive/def.rb, line 30 def literal_predicted_args Predictor::Args.literal(node.args) end
node()
click to toggle source
# File lib/zapata/primitive/def.rb, line 24 def node name, args, body = @code.to_a type = @code.type OpenStruct.new(type: type, name: name, args: args, body: body) end
public?()
click to toggle source
# File lib/zapata/primitive/def.rb, line 20 def public? @access_level == :public end
self?()
click to toggle source
# File lib/zapata/primitive/def.rb, line 16 def self? !!@self end