Class: NodeInfo::Document::Usage

Inherits:
Struct
  • Object
show all
Defined in:
lib/node_info.rb

Defined Under Namespace

Classes: Users

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(local_posts = nil, local_comments = nil) ⇒ Usage

Returns a new instance of Usage.


71
72
73
# File 'lib/node_info.rb', line 71

def initialize(local_posts=nil, local_comments=nil)
  super(Users.new, local_posts, local_comments)
end

Instance Attribute Details

#local_commentsObject

Returns the value of attribute local_comments

Returns:

  • (Object)

    the current value of local_comments


56
57
58
# File 'lib/node_info.rb', line 56

def local_comments
  @local_comments
end

#local_postsObject

Returns the value of attribute local_posts

Returns:

  • (Object)

    the current value of local_posts


56
57
58
# File 'lib/node_info.rb', line 56

def local_posts
  @local_posts
end

#usersObject

Returns the value of attribute users

Returns:

  • (Object)

    the current value of users


56
57
58
# File 'lib/node_info.rb', line 56

def users
  @users
end

Instance Method Details

#version_10_hashObject


75
76
77
78
79
80
81
# File 'lib/node_info.rb', line 75

def version_10_hash
  {
    "users"         => users.version_10_hash,
    "localPosts"    => local_posts,
    "localComments" => local_comments
  }
end