Module: FTL::Serializer::DSL::Format
- Included in:
- FTL::Serializer::DSL
- Defined in:
- lib/ftl/serializer/dsl/format.rb
Instance Attribute Summary collapse
-
#root_name ⇒ Object
readonly
Returns the value of attribute root_name.
Instance Method Summary collapse
- #camel_case? ⇒ Boolean
- #format(format_type) ⇒ Object
- #hash_format ⇒ Object
- #root(root_name) ⇒ Object
Instance Attribute Details
#root_name ⇒ Object (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
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_format ⇒ Object
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 |