Module: FTL::Serializer::DSL::Format

Included in:
FTL::Serializer::DSL
Defined in:
lib/ftl/serializer/dsl/format.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#root_nameObject (readonly)

Returns the value of attribute root_name.



5
6
7
# File 'lib/ftl/serializer/dsl/format.rb', line 5

def root_name
  @root_name
end

Instance Method Details

#camel_case?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/ftl/serializer/dsl/format.rb', line 19

def camel_case?
  hash_format == :camel
end

#format(format_type) ⇒ Object



11
12
13
# File 'lib/ftl/serializer/dsl/format.rb', line 11

def format(format_type)
  @hash_format = format_type
end

#hash_formatObject



15
16
17
# File 'lib/ftl/serializer/dsl/format.rb', line 15

def hash_format
  @hash_format ||= :underscore
end

#root(root_name) ⇒ Object



7
8
9
# File 'lib/ftl/serializer/dsl/format.rb', line 7

def root(root_name)
  @root_name = root_name
end