class Steamd::Generator::GeneratedClass
Represents an Class from the Generator
Public Class Methods
new(klass)
click to toggle source
Create a Generated Class
# File lib/steamd/generator/generated_class.rb, line 99 def initialize(klass) @klass = klass end
Public Instance Methods
constants()
click to toggle source
List of constants to be used in the class
# File lib/steamd/generator/generated_class.rb, line 111 def constants @klass[:variables].select { |v| v[:modifier] == 'const' }.map do |const| Constant.new(const) end end
erb_binding()
click to toggle source
Binding for ERB
# File lib/steamd/generator/generated_class.rb, line 123 def erb_binding binding end
name()
click to toggle source
The class name
# File lib/steamd/generator/generated_class.rb, line 118 def name @klass[:name] end
variables()
click to toggle source
List of variables to be used in the class
# File lib/steamd/generator/generated_class.rb, line 104 def variables @klass[:variables].select { |v| v[:modifier] != 'const' }.map do |var| Variable.new(var) end end