lib/quickbooks/model.rb
# Read-only attributes: These are attributes, but not modifiable in Quickbooks
Read-only attributes: These are attributes, but not modifiable in Quickbooks
Read - only attributes : These are attributes but not modifiable in Quickbooks
def read_only(*args)
        if args.empty?
          @read_only || (@read_only = [])
        else
          args.each do |prop|
            if prop.is_a?(Symbol)
              read_only << prop
              attr_accessor prop
            else
              @object_properties[prop.class_leaf_name.underscore.to_sym] = prop
              read_only << prop.class_leaf_name.underscore.to_sym
              class_eval "def #{prop.class_leaf_name.underscore}=(v); @#{prop.class_leaf_name.underscore} = #{prop.name}.new(v); end
                def #{prop.class_leaf_name.underscore}; @#{prop.class_leaf_name.underscore}; end"
            end
          end
        end
      end
def read_only ( * args ) if args . empty? @read_only || ( @read_only = [ ] ) else args . each do | prop | if prop . is_a? ( Symbol ) read_only << prop attr_accessor prop else @object_properties [ prop . class_leaf_name . underscore . to_sym ] = prop read_only << prop . class_leaf_name . underscore . to_sym class_eval "def #{prop.class_leaf_name.underscore}=(v); @#{prop.class_leaf_name.underscore} = #{prop.name}.new(v); end
                def #{prop.class_leaf_name.underscore}; @#{prop.class_leaf_name.underscore}; end" end end end end
Read-only attributes: These are attributes, but not modifiable in Quickbooks
Read - only attributes : These are attributes but not modifiable in Quickbooks
args
<not_specific>