Class: Antwort::Style
- Inherits:
-
Object
- Object
- Antwort::Style
- Defined in:
- lib/antwort/builder/style.rb
Instance Attribute Summary collapse
-
#duplicate_keys ⇒ Object
readonly
Returns the value of attribute duplicate_keys.
-
#flattened ⇒ Object
readonly
Returns the value of attribute flattened.
-
#keys ⇒ Object
readonly
Returns the value of attribute keys.
-
#original ⇒ Object
readonly
Returns the value of attribute original.
Instance Method Summary collapse
- #duplicates? ⇒ Boolean
- #flattened_str ⇒ Object
-
#initialize(style = '') ⇒ Style
constructor
A new instance of Style.
- #original_str ⇒ Object
Constructor Details
#initialize(style = '') ⇒ Style
Returns a new instance of Style.
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/antwort/builder/style.rb', line 5 def initialize(style = '') @style = style @keys = [] @duplicate_keys = [] @flattened = [] @original = [] convert_to_hash self end |
Instance Attribute Details
#duplicate_keys ⇒ Object (readonly)
Returns the value of attribute duplicate_keys.
3 4 5 |
# File 'lib/antwort/builder/style.rb', line 3 def duplicate_keys @duplicate_keys end |
#flattened ⇒ Object (readonly)
Returns the value of attribute flattened.
3 4 5 |
# File 'lib/antwort/builder/style.rb', line 3 def flattened @flattened end |
#keys ⇒ Object (readonly)
Returns the value of attribute keys.
3 4 5 |
# File 'lib/antwort/builder/style.rb', line 3 def keys @keys end |
#original ⇒ Object (readonly)
Returns the value of attribute original.
3 4 5 |
# File 'lib/antwort/builder/style.rb', line 3 def original @original end |
Instance Method Details
#duplicates? ⇒ Boolean
25 26 27 |
# File 'lib/antwort/builder/style.rb', line 25 def duplicates? !@duplicate_keys.empty? end |
#flattened_str ⇒ Object
21 22 23 |
# File 'lib/antwort/builder/style.rb', line 21 def flattened_str hash_to_str @flattened end |
#original_str ⇒ Object
17 18 19 |
# File 'lib/antwort/builder/style.rb', line 17 def original_str @style end |