Class: CommaParty::ParseAttributes
- Inherits:
-
Object
- Object
- CommaParty::ParseAttributes
- Defined in:
- lib/commaparty/parse_attributes.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(element) ⇒ ParseAttributes
constructor
A new instance of ParseAttributes.
Constructor Details
#initialize(element) ⇒ ParseAttributes
Returns a new instance of ParseAttributes.
4 5 6 |
# File 'lib/commaparty/parse_attributes.rb', line 4 def initialize(element) @attributes = element[1] end |
Instance Method Details
#call ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/commaparty/parse_attributes.rb', line 8 def call if @attributes.is_a?(Hash) @attributes else {} end end |