class Checklister::Github::ProjectDecorator

Public Class Methods

new(object) click to toggle source
# File lib/checklister/github/project.rb, line 4
def initialize(object)
  @object = Checklister::Sanitizer.symbolize JSON.parse(object)
rescue TypeError
  @object = Checklister::Sanitizer.symbolize object
end

Public Instance Methods

description() click to toggle source
# File lib/checklister/github/project.rb, line 18
def description
  @object[:description]
end
id() click to toggle source
# File lib/checklister/github/project.rb, line 10
def id
  @object[:id]
end
name() click to toggle source
# File lib/checklister/github/project.rb, line 14
def name
  @object[:full_name]
end
to_hash() click to toggle source
# File lib/checklister/github/project.rb, line 22
def to_hash
  { id: id, name: name, description: description }
end