Class: Context

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

Overview

代码生成器上下文,保存数据

Constant Summary collapse

@@videoConfigClassName =
"className"
@@videoConfigProperties =
"properties"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(classname, properties) ⇒ Context

Returns a new instance of Context.



14
15
16
17
# File 'lib/translate2language.rb', line 14

def initialize(classname,properties)
    @class_name = classname
    @properties = properties
end

Instance Attribute Details

#class_nameObject (readonly)

Returns the value of attribute class_name.



9
10
11
# File 'lib/translate2language.rb', line 9

def class_name
  @class_name
end

#enums_strObject (readonly)

Returns the value of attribute enums_str.



9
10
11
# File 'lib/translate2language.rb', line 9

def enums_str
  @enums_str
end

#headers_strObject (readonly)

Returns the value of attribute headers_str.



9
10
11
# File 'lib/translate2language.rb', line 9

def headers_str
  @headers_str
end

#propertiesObject (readonly)

Returns the value of attribute properties.



9
10
11
# File 'lib/translate2language.rb', line 9

def properties
  @properties
end

Instance Method Details

#enums(str) ⇒ Object



19
20
21
# File 'lib/translate2language.rb', line 19

def enums(str)
    @enums_str = str
end

#headers(str) ⇒ Object



23
24
25
# File 'lib/translate2language.rb', line 23

def headers(str)
    @headers_str = str
end