class ZanoxPublisher::Format

Wrapper for the format response from Zanox API

Attributes

id[R]
name[R]

Public Class Methods

new(data = {}) click to toggle source
# File lib/zanox_publisher/format.rb, line 6
def initialize(data = {})
  @id   = data.fetch('@id').to_i
  @name = data.fetch('$')
end

Public Instance Methods

to_i() click to toggle source
# File lib/zanox_publisher/format.rb, line 15
def to_i
  @id
end
to_s() click to toggle source
# File lib/zanox_publisher/format.rb, line 11
def to_s
  @name
end