class GSONClassGenerator::OutputOptions

Public Class Methods

new(opts) click to toggle source
# File lib/gson-class-generator.rb, line 48
def initialize(opts)
        @getters = opts.fetch("getters".to_sym, false) === true
        @setters = opts.fetch("setters".to_sym, false) === true
        @final_fields = opts.fetch("final_fields".to_sym, false) === true
        @field_constructor = opts.fetch("field_constructor".to_sym, false) === true
        @boxed_primatives = opts.fetch("boxed_primatives".to_sym, false) === true
        
        # Can't have setters for final fields
        @setters = false if @final_fields
end

Public Instance Methods

boxed_primatives?() click to toggle source
# File lib/gson-class-generator.rb, line 75
def boxed_primatives?
        @boxed_primatives
end
field_constructor?() click to toggle source
# File lib/gson-class-generator.rb, line 71
def field_constructor?
        @field_constructor
end
final_fields?() click to toggle source
# File lib/gson-class-generator.rb, line 67
def final_fields?
        @final_fields
end
getters?() click to toggle source
# File lib/gson-class-generator.rb, line 59
def getters?
        @getters
end
setters?() click to toggle source
# File lib/gson-class-generator.rb, line 63
def setters?
        @setters
end