Class: MisarBlog::Models::Plan

Inherits:
Base
  • Object
show all
Defined in:
lib/misarblog/models.rb

Overview

Plan + usage snapshot (GET /plan).

Instance Attribute Summary

Attributes inherited from Base

#raw

Instance Method Summary collapse

Methods inherited from Base

#[], #initialize, #to_h

Constructor Details

This class inherits a constructor from MisarBlog::Models::Base

Instance Method Details

#nameObject



86
# File 'lib/misarblog/models.rb', line 86

def name;    (@raw["plan"] || {})["name"];                          end

#planObject



84
# File 'lib/misarblog/models.rb', line 84

def plan;    @raw["plan"];                                          end

#slugObject



85
# File 'lib/misarblog/models.rb', line 85

def slug;    (@raw["plan"] || {})["slug"];                          end

#upgradeObject



88
# File 'lib/misarblog/models.rb', line 88

def upgrade; @raw["upgrade"];                                       end

#usageObject



87
# File 'lib/misarblog/models.rb', line 87

def usage;   (@raw["usage"] || []).map { |u| PlanUsage.new(u) };    end