File: dashed_elements.rb

package info (click to toggle)
ruby-roxml 4.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 800 kB
  • sloc: ruby: 4,133; xml: 1,013; makefile: 7
file content (20 lines) | stat: -rwxr-xr-x 424 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env ruby
require_relative './../spec/spec_helper'

module GitHub
  class Commit
    include ROXML
    xml_convention :dasherize

    xml_reader :url
    xml_reader :tree
    xml_reader :message
    xml_reader :id
    xml_reader :committed_date, :as => Date
  end
end

unless defined?(RSpec)
  commit = GitHub::Commit.from_xml(xml_for('dashed_elements'))
  puts commit.committed_date, commit.url, commit.id, ''
end