Module: AttributeStruct::MonkeyCamels::Humps

Defined in:
lib/attribute_struct/monkey_camels.rb

Instance Method Summary collapse

Instance Method Details

#_bactrianself Also known as: bactrian!, no_leading_hump!

Set hump style to non-leading upcase

Returns:

  • (self)


85
86
87
88
89
# File 'lib/attribute_struct/monkey_camels.rb', line 85

def _bactrian
  @__not_camel = false
  @__hump_style = :no_leading_hump
  self
end

#_camel?TrueClass, FalseClass

Returns camelized.

Returns:

  • (TrueClass, FalseClass)

    camelized



49
50
51
52
53
54
55
# File 'lib/attribute_struct/monkey_camels.rb', line 49

def _camel?
  if defined?(@__not_camel)
    !@__not_camel
  else
    true
  end
end

#_dromedaryself Also known as: dromedary!, leading_hump!

Set hump style to leading upcase

Returns:

  • (self)


97
98
99
100
101
# File 'lib/attribute_struct/monkey_camels.rb', line 97

def _dromedary
  @__not_camel = false
  @__hump_style = :leading_hump
  self
end

#_humpself Also known as: camel!

Returns enable camelizing.

Returns:

  • (self)

    enable camelizing



66
67
68
69
# File 'lib/attribute_struct/monkey_camels.rb', line 66

def _hump
  @__not_camel = false
  self
end

#_hump_format_requested?TrueClass, FalseClass

Returns specific style requested.

Returns:

  • (TrueClass, FalseClass)

    specific style requested



40
41
42
43
44
45
46
# File 'lib/attribute_struct/monkey_camels.rb', line 40

def _hump_format_requested?
  if defined?(@__not_camel)
    @__not_camel != nil
  else
    false
  end
end

#_hump_styleSymbol, NilClass Also known as: hump_style!

Returns style of hump.

Returns:

  • (Symbol, NilClass)

    style of hump



74
75
76
77
78
# File 'lib/attribute_struct/monkey_camels.rb', line 74

def _hump_style
  if defined?(@__hump_style)
    @__hump_style
  end
end

#_no_humpself Also known as: disable_camel!

Returns disable camelizing.

Returns:

  • (self)

    disable camelizing



58
59
60
61
# File 'lib/attribute_struct/monkey_camels.rb', line 58

def _no_hump
  @__not_camel = true
  self
end