Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for assigning a class to an attribute #68

Merged
merged 4 commits into from
Mar 22, 2015
Merged

Added support for assigning a class to an attribute #68

merged 4 commits into from
Mar 22, 2015

Conversation

swunderlich
Copy link

Support for the classes Integer, Float, Time on attributes

class ExampleRow
  include SAXMachine
  attribute :created_at, class: Time
  attribute :counter, class: Integer
  attribute :exchange_rate, class: Float
end

I don't think other classes make that much sense. If none is given it still returns a string. I think the pending test can be removed as it is not a common case. (And I can't get my head around it right now :) )

Sönke Buhr added 4 commits March 21, 2015 00:36
@krasnoukhov
Copy link
Collaborator

Thanks for the PR. I'm going to make some changes and cut a release shotly

krasnoukhov added a commit that referenced this pull request Mar 22, 2015
Added support for assigning a class to an attribute
@krasnoukhov krasnoukhov merged commit 5839583 into pauldix:master Mar 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants