Skip to content

Commit

Permalink
Merge branch 'master' into config
Browse files Browse the repository at this point in the history
  • Loading branch information
dag committed Apr 23, 2008
2 parents 3700f32 + df8783e commit e67249a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/amazing/widgets/battery.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,19 @@ class Battery < Widget
@percentage = (remaining * 100) / lastfull.to_f
end
end

private

def charged?
@state == :charged
end

def charging?
@state == :charging
end

def discharging?
@state == :discharging
end
end
end

0 comments on commit e67249a

Please sign in to comment.