Permalink
Browse files

little cleanups

  • Loading branch information...
1 parent abc9b48 commit d1ec7ab30cc792f378eaa87ab59421383e3a1f7c @tenderlove committed Jun 2, 2009
Showing with 6 additions and 4 deletions.
  1. +6 −4 lib/nfc/lib_nfc.rb
View
@@ -44,6 +44,10 @@ def uid
self[:abtUid].to_a.slice(0, self[:uiUidLen])
end
+ def ats
+ self[:abtAts].to_a.slice(0, self[:uiAtsLen])
+ end
+
def inspect
uid = sprintf((['%02x'] * self[:uiUidLen]).join(' '), *self.uid)
@@ -54,10 +58,8 @@ def inspect
" SAK (SEL_RES): #{sprintf("%02x", self[:btSak])}"
]
if self[:uiAtsLen] > 0
- ats =
- sprintf((['%02x'] * self[:uiAtsLen]).join(' '), *(self[:abtAts]))
- string_ary <<
- " ATS (ATR): #{ats}"
+ ats = sprintf((['%02x'] * self[:uiAtsLen]).join(' '), *self.ats)
+ string_ary << " ATS (ATR): #{ats}"
end
string_ary.join "\n"
end

0 comments on commit d1ec7ab

Please sign in to comment.